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 -11
View File
@@ -65,7 +65,7 @@ impl Default for SettingSource {
/// These can be configured globally in `/etc/yubico/yubikeypiv.conf` by a
/// system administrator, or by the local user via `YUBIKEY_PIV_*` environment
/// variables.
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, Default)]
pub struct Setting {
/// Boolean value
pub value: bool,
@@ -99,7 +99,7 @@ impl Setting {
}
let (name, value) = {
let mut parts = line.splitn(1, '=');
let mut parts = line.splitn(2, '=');
let name = parts.next();
let value = parts.next();
match (name, value, parts.next()) {
@@ -130,12 +130,3 @@ impl Setting {
})
}
}
impl Default for Setting {
fn default() -> Self {
Self {
value: false,
source: SettingSource::default(),
}
}
}