mirror of
https://github.com/uutils/shadow.git
synced 2026-06-10 16:14:57 -07:00
validate.rs: Fix comment
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -39,7 +39,7 @@ pub fn validate_username(name: &str) -> Result<(), ShadowError> {
|
||||
}
|
||||
|
||||
let mut chars = name.chars();
|
||||
// Name is guaranteed non-empty by the check above.
|
||||
// Reject empty names by requiring a first character here.
|
||||
let Some(first) = chars.next() else {
|
||||
return Err(ShadowError::Validation("username must not be empty".into()));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user