Clippy easy wins 1 (#596)

This commit is contained in:
trevyn
2021-03-17 10:51:53 -04:00
committed by GitHub
parent 4e4880be8e
commit a88a522f84
6 changed files with 13 additions and 40 deletions
+2 -4
View File
@@ -63,10 +63,8 @@ impl SlateGetter for PathToSlate {
let bin_res = byte_ser::from_bytes::<VersionedBinSlate>(&data);
if let Err(e) = bin_res {
debug!("Not a valid binary slate: {} - Will try JSON", e);
} else {
if let Ok(s) = bin_res {
return Ok((Slate::upgrade(s.into())?, true));
}
} else if let Ok(s) = bin_res {
return Ok((Slate::upgrade(s.into())?, true));
}
// Otherwise try json