aboutsummaryrefslogtreecommitdiffstats
path: root/src/config_list.rs
diff options
context:
space:
mode:
authorDirk Van Haerenborgh <vhdirk@gmail.com>2019-11-16 11:14:10 +0100
committerDirk Van Haerenborgh <vhdirk@gmail.com>2019-11-16 11:14:10 +0100
commite16769c9b16223c491766f9c9b2c828ee2253ed4 (patch)
treed1a6e68acc5bbb14d9f1e6bf65d7549916ff95b9 /src/config_list.rs
parent084675fdfe1329cbd58a48f2306b7c61dec08834 (diff)
downloadmail-e16769c9b16223c491766f9c9b2c828ee2253ed4.tar.gz
less unwraps
Diffstat (limited to 'src/config_list.rs')
-rw-r--r--src/config_list.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config_list.rs b/src/config_list.rs
index 632603c..b819418 100644
--- a/src/config_list.rs
+++ b/src/config_list.rs
@@ -6,7 +6,7 @@ use ffi;
use Database;
use Filenames;
use FilenamesOwner;
-use utils::{ScopedSupercow, ScopedPhantomcow};
+use utils::{ToStr, ScopedSupercow, ScopedPhantomcow};
#[derive(Debug)]
@@ -46,15 +46,15 @@ impl<'d> Iterator for ConfigList<'d>
}
let (k, v) = unsafe {
- let key = CStr::from_ptr(ffi::notmuch_config_list_key(self.ptr));
- let value = CStr::from_ptr(ffi::notmuch_config_list_value(self.ptr));
+ let key = ffi::notmuch_config_list_key(self.ptr);
+ let value = ffi::notmuch_config_list_value(self.ptr);
ffi::notmuch_config_list_move_to_next(self.ptr);
(key, value)
};
- Some((k.to_str().unwrap().to_string(), v.to_str().unwrap().to_string()))
+ Some((k.to_string_lossy().to_string(), v.to_string_lossy().to_string()))
}
}