summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channel/validate.rs4
-rw-r--r--src/token/secret.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/channel/validate.rs b/src/channel/validate.rs
index 0c97293..7894e0c 100644
--- a/src/channel/validate.rs
+++ b/src/channel/validate.rs
@@ -1,3 +1,5 @@
+use std::ops::Not as _;
+
use unicode_segmentation::UnicodeSegmentation as _;
use crate::name::Name;
@@ -10,7 +12,7 @@ pub fn name(name: &Name) -> bool {
[
display.graphemes(true).count() < NAME_TOO_LONG,
- display.chars().all(|ch| !ch.is_control()),
+ display.chars().any(char::is_control).not(),
display.chars().next().is_some_and(|c| !c.is_whitespace()),
display.chars().last().is_some_and(|c| !c.is_whitespace()),
display
diff --git a/src/token/secret.rs b/src/token/secret.rs
index 8f70646..82a43b3 100644
--- a/src/token/secret.rs
+++ b/src/token/secret.rs
@@ -13,7 +13,7 @@ impl Secret {
impl fmt::Debug for Secret {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- f.debug_tuple("IdentityToken").field(&"********").finish()
+ f.debug_tuple("Secret").field(&"********").finish()
}
}