Skip to content

Commit

Permalink
chore: ignore some test code
Browse files Browse the repository at this point in the history
  • Loading branch information
louib committed Aug 23, 2024
1 parent d72be09 commit 209ecc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/db/group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::db::{
};

pub enum SearchField {
#[cfg(test)]
UUID,
Title,
}
Expand All @@ -23,6 +24,7 @@ impl SearchField {
Node::Group(g) => Some(g.get_name()),
};
match self {
#[cfg(test)]
SearchField::UUID => uuid.to_string() == field_value,
SearchField::Title => {
if let Some(title) = title {
Expand Down Expand Up @@ -120,6 +122,7 @@ impl Group {
self.get_internal(&path, SearchField::Title)
}

#[cfg(test)]
pub(crate) fn get_by_uuid<'a, T: AsRef<str>>(&'a self, path: &[T]) -> Option<NodeRef<'a>> {
self.get_internal(&path, SearchField::UUID)
}
Expand Down Expand Up @@ -156,6 +159,7 @@ impl Group {
self.get_mut_internal(path, SearchField::Title)
}

#[cfg(test)]
pub(crate) fn get_by_uuid_mut<'a, T: AsRef<str>>(&'a mut self, path: &[T]) -> Option<NodeRefMut<'a>> {
self.get_mut_internal(path, SearchField::UUID)
}
Expand Down

0 comments on commit 209ecc2

Please sign in to comment.