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.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ide-db/src/label.rs b/crates/ide-db/src/label.rs
index 4b6d54b5ea..919c1273e5 100644
--- a/crates/ide-db/src/label.rs
+++ b/crates/ide-db/src/label.rs
@@ -1,6 +1,8 @@
//! See [`Label`]
use std::fmt;
+use stdx::always;
+
/// A type to specify UI label, like an entry in the list of assists. Enforces
/// proper casing:
///
@@ -30,7 +32,7 @@ impl From<Label> for String {
impl Label {
pub fn new(label: String) -> Label {
- assert!(label.starts_with(char::is_uppercase) && !label.ends_with('.'));
+ always!(label.starts_with(char::is_uppercase) && !label.ends_with('.'));
Label(label)
}
}