2021 edition upgrade; MSRV 1.56 (#343)

Changes the `edition` to 2021 in both the `yubikey` and `yubikey-cli`
crates.

Removes `TryFrom`/`TryInto` imports, now that they're in the prelude.
This commit is contained in:
Tony Arcieri (iqlusion)
2022-01-17 14:54:01 -08:00
committed by GitHub
parent 74a50f0f0c
commit dd4b1c60a4
18 changed files with 40 additions and 58 deletions
+2 -2
View File
@@ -111,7 +111,7 @@ impl MsRoots {
let mut data_chunk: usize;
let data = &self.0;
let data_len = data.len();
let n_objs: usize;
let txn = yubikey.begin_transaction()?;
if data_len == 0 {
@@ -119,7 +119,7 @@ impl MsRoots {
}
// Calculate number of objects required to store blob
n_objs = (data_len / (CB_OBJ_MAX - CB_OBJ_TAG_MAX)) + 1;
let n_objs: usize = (data_len / (CB_OBJ_MAX - CB_OBJ_TAG_MAX)) + 1;
if n_objs > 5 {
return Err(Error::SizeError);