From 9bcd659af2e2e6da39b3783c2ca52aced8976e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20DOUIN?= Date: Mon, 27 Jun 2022 20:55:22 +0200 Subject: [PATCH] clean mbox lib module --- lib/src/mbox/mbox.rs | 4 ++++ lib/src/mbox/mboxes.rs | 10 +++++++--- lib/src/mbox/mod.rs | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/src/mbox/mbox.rs b/lib/src/mbox/mbox.rs index b14606ca..ceab6696 100644 --- a/lib/src/mbox/mbox.rs +++ b/lib/src/mbox/mbox.rs @@ -1,3 +1,7 @@ +//! Mailbox module. +//! +//! This module contains the representation of the mailbox. + use serde::Serialize; use std::fmt; diff --git a/lib/src/mbox/mboxes.rs b/lib/src/mbox/mboxes.rs index 161479eb..0adca856 100644 --- a/lib/src/mbox/mboxes.rs +++ b/lib/src/mbox/mboxes.rs @@ -1,5 +1,9 @@ +//! Mailboxes module. +//! +//! This module contains the representation of the mailboxes. + use serde::Serialize; -use std::ops::{Deref, DerefMut}; +use std::ops; use super::Mbox; @@ -10,7 +14,7 @@ pub struct Mboxes { pub mboxes: Vec, } -impl Deref for Mboxes { +impl ops::Deref for Mboxes { type Target = Vec; fn deref(&self) -> &Self::Target { @@ -18,7 +22,7 @@ impl Deref for Mboxes { } } -impl DerefMut for Mboxes { +impl ops::DerefMut for Mboxes { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.mboxes } diff --git a/lib/src/mbox/mod.rs b/lib/src/mbox/mod.rs index 5efcf73c..25e70b54 100644 --- a/lib/src/mbox/mod.rs +++ b/lib/src/mbox/mod.rs @@ -1,3 +1,7 @@ +//! Mailbox module. +//! +//! This module contains everything related to mailboxes. + mod mbox; pub use mbox::*;