Give TagName a From<&str>

This commit is contained in:
Richard Feldman 2022-08-09 13:46:36 -04:00 committed by Ayaz Hafiz
parent aa5e1e6a27
commit 6af6006cdd
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -65,6 +65,12 @@ impl TagName {
}
}
impl From<&str> for TagName {
fn from(string: &str) -> Self {
Self(string.into())
}
}
impl ModuleName {
// NOTE: After adding one of these, go to `impl ModuleId` and
// add a corresponding ModuleId to there!