aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2020-09-29 21:48:57 -0700
committerDaniel Mueller <deso@posteo.net>2020-10-11 17:07:09 -0700
commitf526522d5bc722f32a9084cda92e4b003b4aab20 (patch)
treefd842c30e3f29b890341d71819b34a4ffb5d5d00 /src/config.rs
parentc7b64866c483036b548b336b8de2172d9da66ea9 (diff)
downloadnitrocli-f526522d5bc722f32a9084cda92e4b003b4aab20.tar.gz
nitrocli-f526522d5bc722f32a9084cda92e4b003b4aab20.tar.bz2
"Fix" empty vector deserialization problem
Needed until https://github.com/softprops/envy/pull/51 got merged and a new release been cut.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 6bb6efb..44eaf3f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -51,6 +51,7 @@ where
let strings = Vec::<String>::deserialize(d).map_err(D::Error::custom)?;
let result = strings
.iter()
+ .filter(|s| !s.is_empty())
.map(|s| nitrokey::SerialNumber::from_str(s))
.collect::<Result<_, _>>();
result.map_err(D::Error::custom)