From d5bf44aa8bfd01c23efaf5f8547cceb653916031 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 29 Feb 2020 22:04:39 +0100 Subject: Remove notmuch thread wrapping code Signed-off-by: Matthias Beyer --- lib/domain/libimagmail/src/mail.rs | 1 - lib/domain/libimagmail/src/notmuch/mod.rs | 1 - lib/domain/libimagmail/src/notmuch/thread.rs | 49 ---------------------------- 3 files changed, 51 deletions(-) delete mode 100644 lib/domain/libimagmail/src/notmuch/thread.rs diff --git a/lib/domain/libimagmail/src/mail.rs b/lib/domain/libimagmail/src/mail.rs index 5325dbca..3d9dec12 100644 --- a/lib/domain/libimagmail/src/mail.rs +++ b/lib/domain/libimagmail/src/mail.rs @@ -35,7 +35,6 @@ use libimagentryutil::isa::IsKindHeaderPathProvider; use libimagentryutil::isa::Is; use crate::notmuch::connection::NotmuchConnection; -use crate::notmuch::thread::Thread; use crate::store::MailStoreWithConnection; provide_kindflag_path!(pub IsMail, "mail.is_mail"); diff --git a/lib/domain/libimagmail/src/notmuch/mod.rs b/lib/domain/libimagmail/src/notmuch/mod.rs index 812a045f..4ef47243 100644 --- a/lib/domain/libimagmail/src/notmuch/mod.rs +++ b/lib/domain/libimagmail/src/notmuch/mod.rs @@ -18,4 +18,3 @@ // pub mod connection; -pub mod thread; diff --git a/lib/domain/libimagmail/src/notmuch/thread.rs b/lib/domain/libimagmail/src/notmuch/thread.rs deleted file mode 100644 index 9ac8223a..00000000 --- a/lib/domain/libimagmail/src/notmuch/thread.rs +++ /dev/null @@ -1,49 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015-2020 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use notmuch_rs::Thread as NotmuchThread; - -pub struct Thread { - id: String, - msgs: Vec -} - -impl From> for Thread { - fn from(nmt: NotmuchThread) -> Self { - let msgs = nmt.messages() - .map(|msg| msg.id().into_owned()) - .collect(); - - Thread::new(nmt.id().to_owned(), msgs) - } -} - -impl Thread { - pub(crate) fn new(id: String, msgs: Vec) -> Self { - Thread { id, msgs } - } - - pub fn id(&self) -> &String { - &self.id - } - - pub fn messages(&self) -> &Vec { - &self.msgs - } -} -- cgit v1.2.3