diff options
| author | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2018-12-14 18:45:20 +0100 |
|---|---|---|
| committer | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2018-12-14 18:45:20 +0100 |
| commit | 4b19b951dd2fb7aa7bc662170c91401f2e8fac3b (patch) | |
| tree | 5b436865f4ae78a90129147e1a0fd8b53b2746b2 /src/directory.rs | |
| parent | 022fb6eebf7774b19a1e1b3c6cee7bd7e1b75cd9 (diff) | |
| download | mail-4b19b951dd2fb7aa7bc662170c91401f2e8fac3b.tar.gz | |
remove StreamingIterator again as the iterators don't actually have ownership over items
Diffstat (limited to 'src/directory.rs')
| -rw-r--r-- | src/directory.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/directory.rs b/src/directory.rs index be2ea5c..09baf77 100644 --- a/src/directory.rs +++ b/src/directory.rs @@ -5,6 +5,7 @@ use crate::ffi; use crate::Database; use crate::Filenames; use crate::FilenamesOwner; +use crate::utils::{ScopedSupercow, ScopedPhantomcow}; #[derive(Debug)] pub(crate) struct DirectoryPtr { @@ -20,7 +21,7 @@ impl Drop for DirectoryPtr { #[derive(Debug)] pub struct Directory<'d> { handle: DirectoryPtr, - marker: Phantomcow<'d, Database>, + marker: ScopedPhantomcow<'d, Database>, } impl<'d> FilenamesOwner for Directory<'d> {} @@ -28,7 +29,7 @@ impl<'d> FilenamesOwner for Directory<'d> {} impl<'d> Directory<'d> { pub fn from_ptr<O>(ptr: *mut ffi::notmuch_directory_t, owner: O) -> Directory<'d> where - O: Into<Phantomcow<'d, Database>>, + O: Into<ScopedPhantomcow<'d, Database>>, { Directory { handle: DirectoryPtr { ptr }, @@ -44,7 +45,7 @@ impl<'d> Directory<'d> { pub trait DirectoryExt<'d> { fn child_directories<'s, S>(directory: S) -> Filenames<'s, Directory<'d>> where - S: Into<Supercow<'s, Directory<'d>>>, + S: Into<ScopedSupercow<'s, Directory<'d>>>, { let dir = directory.into(); Filenames::from_ptr( |
