[niepce] fwk: Fix a clippy warning about uneeded unwrap()
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] fwk: Fix a clippy warning about uneeded unwrap()
- Date: Thu, 26 May 2022 04:33:48 +0000 (UTC)
commit 01e285507b81a5a236d5ee85698fbe46447b91ce
Author: Hubert Figuière <hub figuiere net>
Date: Mon May 23 23:20:45 2022 -0400
fwk: Fix a clippy warning about uneeded unwrap()
crates/npc-fwk/src/utils/exempi.rs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/crates/npc-fwk/src/utils/exempi.rs b/crates/npc-fwk/src/utils/exempi.rs
index dbaae02..3fc4768 100644
--- a/crates/npc-fwk/src/utils/exempi.rs
+++ b/crates/npc-fwk/src/utils/exempi.rs
@@ -1,7 +1,7 @@
/*
* niepce - fwk/utils/exempi.rs
*
- * Copyright (C) 2017-2021 Hubert Figuière
+ * Copyright (C) 2017-2022 Hubert Figuière
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -211,8 +211,7 @@ impl XmpMeta {
return meta;
}
sidecar_meta
- } else {
- let mut final_meta = sidecar_meta.unwrap();
+ } else if let Some(mut final_meta) = sidecar_meta {
if !meta
.as_ref()
.unwrap()
@@ -225,6 +224,8 @@ impl XmpMeta {
} else {
Some(final_meta)
}
+ } else {
+ unreachable!("sidecar_meta was None");
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]