~kmaasrud/maildirpp

e2ef72fe09187dff415a8b4a414788d95fb6d2cf — Knut Magnus Aasrud 5 months ago 9555943
feat: add `to_path_buf` method to `MailEntry`
1 files changed, 5 insertions(+), 0 deletions(-)

M src/entry.rs
M src/entry.rs => src/entry.rs +5 -0
@@ 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