Let ContactData be unpacked and derefd
This commit is contained in:
parent
4fa41faa59
commit
dfbc69400a
1 changed files with 18 additions and 0 deletions
|
@ -17,6 +17,8 @@
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
//
|
//
|
||||||
|
|
||||||
|
use std::ops::Deref;
|
||||||
|
|
||||||
use vobject::Component;
|
use vobject::Component;
|
||||||
use toml::Value;
|
use toml::Value;
|
||||||
use toml_query::read::TomlValueReadExt;
|
use toml_query::read::TomlValueReadExt;
|
||||||
|
@ -69,4 +71,20 @@ impl Contact for Entry {
|
||||||
|
|
||||||
pub struct ContactData(Component);
|
pub struct ContactData(Component);
|
||||||
|
|
||||||
|
impl ContactData {
|
||||||
|
|
||||||
|
pub fn into_inner(self) -> Component {
|
||||||
|
self.0
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Deref for ContactData {
|
||||||
|
type Target = Component;
|
||||||
|
|
||||||
|
fn deref(&self) -> &Self::Target {
|
||||||
|
&self.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue