Moved Oid into document module.
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s

This commit is contained in:
2026-02-13 12:48:17 -05:00
parent 45bcd04ee3
commit 115910120c
4 changed files with 32 additions and 51 deletions

View File

@@ -266,24 +266,6 @@ impl Operation {
}
}
#[allow(dead_code)]
#[derive(Clone, Debug)]
enum QueryType {
Query(Query),
Oids(HashSet<Oid>),
}
impl From<Query> for QueryType {
fn from(value: Query) -> Self {
QueryType::Query(value)
}
}
impl From<HashSet<Oid>> for QueryType {
fn from(value: HashSet<Oid>) -> Self {
QueryType::Oids(value)
}
}
#[allow(dead_code)]
#[derive(Clone, Debug)]
@@ -490,32 +472,3 @@ impl Update {
&mut self.values
}
}
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Oid {
oid: Uuid,
}
impl Oid {
pub fn new() -> Self {
Self {
oid: Uuid::new_v4(),
}
}
}
#[cfg(test)]
mod oids {
use super::*;
#[test]
fn are_oids_random() {
let count = 10;
let mut holder: Vec<Oid> = Vec::new();
while holder.len() < count {
let result = Oid::new();
assert!(!holder.contains(&result));
holder.push(result);
}
}
}