Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_db/src/label.rs')
| -rw-r--r-- | crates/ide_db/src/label.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ide_db/src/label.rs b/crates/ide_db/src/label.rs index 1f1e715c97..4b6d54b5ea 100644 --- a/crates/ide_db/src/label.rs +++ b/crates/ide_db/src/label.rs @@ -29,8 +29,7 @@ impl From<Label> for String { } impl Label { - pub fn new(label: impl Into<String>) -> Label { - let label = label.into(); + pub fn new(label: String) -> Label { assert!(label.starts_with(char::is_uppercase) && !label.ends_with('.')); Label(label) } |