From e2ef72fe09187dff415a8b4a414788d95fb6d2cf Mon Sep 17 00:00:00 2001 From: Knut Magnus Aasrud Date: Fri, 29 Mar 2024 17:28:09 +0100 Subject: [PATCH] feat: add `to_path_buf` method to `MailEntry` --- src/entry.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/entry.rs b/src/entry.rs index cdc0653..2aaa1e1 100644 --- a/src/entry.rs +++ b/src/entry.rs @@ -113,6 +113,11 @@ impl MailEntry { &self.path } + /// Takes ownership of the [`MailEntry`] and returns the base [`PathBuf`] + pub fn to_path_buf(self) -> PathBuf { + self.path + } + /// Moves the mail entry fn move_to(&mut self, folder: &str) -> Result<(), Error> { let parent = self -- 2.45.2