[niepce/lr-import: 16/20] rust: Fix some compiler warnings
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce/lr-import: 16/20] rust: Fix some compiler warnings
- Date: Mon, 20 Dec 2021 05:37:15 +0000 (UTC)
commit 0a932241929c737398b881525ef84cbf0e3c31fd
Author: Hubert Figuière <hub figuiere net>
Date: Sun Dec 12 18:37:34 2021 -0500
rust: Fix some compiler warnings
crates/npc-engine/src/bin/importlr.rs | 2 +-
crates/npc-fwk/src/utils/exempi.rs | 16 ++++++++++++----
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/crates/npc-engine/src/bin/importlr.rs b/crates/npc-engine/src/bin/importlr.rs
index ba5aa77..a8bd352 100644
--- a/crates/npc-engine/src/bin/importlr.rs
+++ b/crates/npc-engine/src/bin/importlr.rs
@@ -36,7 +36,7 @@ fn main() {
let catalog = matches.value_of("CATALOG").unwrap();
let verbosity = matches.occurrences_of("v");
- let (sender, recv) = async_channel::unbounded();
+ let (sender, _recv) = async_channel::unbounded();
let mut library = LibraryClient::new(PathBuf::from(library), sender);
// library.init();
diff --git a/crates/npc-fwk/src/utils/exempi.rs b/crates/npc-fwk/src/utils/exempi.rs
index 1a555f3..3ac5e91 100644
--- a/crates/npc-fwk/src/utils/exempi.rs
+++ b/crates/npc-fwk/src/utils/exempi.rs
@@ -133,13 +133,21 @@ pub struct ExempiManager {}
impl ExempiManager {
pub fn new(namespaces: Option<Vec<NsDef>>) -> ExempiManager {
- exempi2::register_namespace(NIEPCE_XMP_NAMESPACE, NIEPCE_XMP_NS_PREFIX);
- exempi2::register_namespace(UFRAW_INTEROP_NAMESPACE, UFRAW_INTEROP_NS_PREFIX);
+ on_err_out!(exempi2::register_namespace(
+ NIEPCE_XMP_NAMESPACE,
+ NIEPCE_XMP_NS_PREFIX
+ ));
+ on_err_out!(exempi2::register_namespace(
+ UFRAW_INTEROP_NAMESPACE,
+ UFRAW_INTEROP_NS_PREFIX
+ ));
if let Some(nslist) = namespaces {
for nsdef in nslist {
- // TOOD check the return value
- exempi2::register_namespace(nsdef.ns.as_str(), nsdef.prefix.as_str());
+ on_err_out!(exempi2::register_namespace(
+ nsdef.ns.as_str(),
+ nsdef.prefix.as_str()
+ ));
}
}
ExempiManager {}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]