compare str == str instead of str bytes == bytes
This commit is contained in:
parent
eed2dad08f
commit
36dc36d454
10
src/cli.rs
10
src/cli.rs
@ -671,13 +671,7 @@ pub fn run_cli() -> Fido2LuksResult<()> {
|
||||
token.credential = token
|
||||
.credential
|
||||
.into_iter()
|
||||
.filter(|cred| {
|
||||
!credentials
|
||||
.ids
|
||||
.0
|
||||
.iter()
|
||||
.any(|h| &h.0[..] == cred.as_bytes())
|
||||
})
|
||||
.filter(|cred| !credentials.ids.0.iter().any(|h| &h.to_string() == cred))
|
||||
.collect();
|
||||
dev.update_token(id, &token)?;
|
||||
}
|
||||
@ -690,7 +684,7 @@ pub fn run_cli() -> Fido2LuksResult<()> {
|
||||
let mut remove = Vec::new();
|
||||
for token in dev.tokens()? {
|
||||
let (id, token) = token?;
|
||||
if token.keyslots.is_empty() {
|
||||
if token.keyslots.is_empty() || token.credential.is_empty() {
|
||||
creds.extend(token.credential);
|
||||
remove.push(id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user