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
|
token.credential = token
|
||||||
.credential
|
.credential
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|cred| {
|
.filter(|cred| !credentials.ids.0.iter().any(|h| &h.to_string() == cred))
|
||||||
!credentials
|
|
||||||
.ids
|
|
||||||
.0
|
|
||||||
.iter()
|
|
||||||
.any(|h| &h.0[..] == cred.as_bytes())
|
|
||||||
})
|
|
||||||
.collect();
|
.collect();
|
||||||
dev.update_token(id, &token)?;
|
dev.update_token(id, &token)?;
|
||||||
}
|
}
|
||||||
@ -690,7 +684,7 @@ pub fn run_cli() -> Fido2LuksResult<()> {
|
|||||||
let mut remove = Vec::new();
|
let mut remove = Vec::new();
|
||||||
for token in dev.tokens()? {
|
for token in dev.tokens()? {
|
||||||
let (id, token) = token?;
|
let (id, token) = token?;
|
||||||
if token.keyslots.is_empty() {
|
if token.keyslots.is_empty() || token.credential.is_empty() {
|
||||||
creds.extend(token.credential);
|
creds.extend(token.credential);
|
||||||
remove.push(id);
|
remove.push(id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user