Make id_raw return Option<&ImmutableString>

This commit is contained in:
Stephen Chung
2021-01-03 11:25:25 +08:00
parent e3b7aa47a0
commit 70a0d6ce58
3 changed files with 17 additions and 21 deletions

View File

@@ -252,8 +252,8 @@ impl Module {
}
/// Get the ID of the [`Module`] as an [`ImmutableString`], if any.
pub fn id_raw(&self) -> &Option<ImmutableString> {
&self.id
pub fn id_raw(&self) -> Option<&ImmutableString> {
self.id.as_ref()
}
/// Set the ID of the [`Module`].