Skip to content

Commit

Permalink
feat(class): added plural label
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeluk committed Sep 12, 2022
1 parent 90a8e86 commit eeb24a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/class.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ impl Class {
#[allow(clippy::let_and_return)]
count_result
}

pub fn plural_label(&self) -> String { format!("{}s", self.local_name) } // TODO: Make this slightly smarter
}

#[cfg(test)]
Expand Down
14 changes: 13 additions & 1 deletion src/lexical_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,20 @@ impl Clone for LexicalValue {
todo!("the situation where the blank_node in a lexical value is empty")
}
},
DataType::String => {
if let Some(string) = self.as_string() {
LexicalValue {
data_type: self.data_type,
value: LexicalValueUnion {
string: ManuallyDrop::new(string),
},
}
} else {
todo!("the situation where the string in a lexical value is empty")
}
},
_ => {
todo!("dealing with other datatypes")
todo!("dealing with other datatypes: {:?}", self.data_type)
},
}
}
Expand Down

0 comments on commit eeb24a9

Please sign in to comment.