Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/base_db/src/input.rs')
-rw-r--r--crates/base_db/src/input.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs
index f182427e47..08d3bc93ff 100644
--- a/crates/base_db/src/input.rs
+++ b/crates/base_db/src/input.rs
@@ -97,6 +97,10 @@ impl CrateName {
pub fn normalize_dashes(name: &str) -> CrateName {
Self(SmolStr::new(name.replace('-', "_")))
}
+
+ pub fn as_smol_str(&self) -> &SmolStr {
+ &self.0
+ }
}
impl fmt::Display for CrateName {