tree-wide: use is_empty() and similar

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler
2021-12-30 14:49:11 +01:00
parent 540fca5c9e
commit 3afecb8409
6 changed files with 7 additions and 7 deletions

View File

@ -35,7 +35,7 @@ impl StaticAuthAdapter {
let mut ticket_file = File::open(TICKET_FILE)?;
let mut ticket = String::new();
let len = ticket_file.read_to_string(&mut ticket)?;
if len <= 0 {
if len == 0 {
bail!("invalid ticket: cannot be empty");
}
Ok(StaticAuthAdapter { ticket })