From 0e8f3d9a764204b6edabdc50112b3bf9ded939f4 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Wed, 14 Feb 2024 13:02:37 +0100 Subject: [PATCH] conf: fix warnings in tests Signed-off-by: Vincenzo Palazzo --- conf/src/lib.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/conf/src/lib.rs b/conf/src/lib.rs index 55d0012..cfce51a 100644 --- a/conf/src/lib.rs +++ b/conf/src/lib.rs @@ -262,8 +262,8 @@ mod tests { fn flush_conf_one() { let path = get_conf_path(); let mut conf = CLNConf::new(path.to_string(), false); - conf.add_conf("plugin", "/some/path"); - conf.add_conf("network", "bitcoin"); + conf.add_conf("plugin", "/some/path").unwrap(); + conf.add_conf("network", "bitcoin").unwrap(); let result = conf.flush(); assert!(result.is_ok()); @@ -282,9 +282,9 @@ mod tests { fn flush_conf_two() { let path = get_conf_path(); let mut conf = CLNConf::new(path.to_string(), false); - conf.add_conf("plugin", "/some/path"); - conf.add_conf("plugin", "foo"); - conf.add_conf("network", "bitcoin"); + conf.add_conf("plugin", "/some/path").unwrap(); + conf.add_conf("plugin", "foo").unwrap(); + conf.add_conf("network", "bitcoin").unwrap(); let result = conf.flush(); assert!(result.is_ok()); @@ -303,10 +303,10 @@ mod tests { fn flush_conf_three() { let path = get_conf_path(); let mut conf = CLNConf::new(path.to_string(), false); - conf.add_conf("network", "bitcoin"); - conf.add_conf("plugin", "/some/path"); - conf.add_conf("plugin", "/some/other/path"); - conf.rm_conf("plugin", None); + conf.add_conf("network", "bitcoin").unwrap(); + conf.add_conf("plugin", "/some/path").unwrap(); + conf.add_conf("plugin", "/some/other/path").unwrap(); + conf.rm_conf("plugin", None).unwrap(); let result = conf.flush(); assert!(result.is_ok()); @@ -325,10 +325,10 @@ mod tests { fn flush_conf_four() { let path = get_conf_path(); let mut conf = CLNConf::new(path.to_string(), false); - conf.add_conf("network", "bitcoin"); - conf.add_conf("plugin", "/some/path"); - conf.add_conf("plugin", "/some/other/path"); - conf.rm_conf("plugin", Some("/some/other/path")); + conf.add_conf("network", "bitcoin").unwrap(); + conf.add_conf("plugin", "/some/path").unwrap(); + conf.add_conf("plugin", "/some/other/path").unwrap(); + conf.rm_conf("plugin", Some("/some/other/path")).unwrap(); let result = conf.flush(); assert!(result.is_ok());