From 1aa5daae7c8b18b2ff4128c7bcc49db676e7e293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edvard=20Th=C3=B6rnros?= Date: Tue, 2 Feb 2021 20:30:46 +0100 Subject: remove as_type() --- src/lib.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index e1b7f89..ec3b1c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,6 +111,12 @@ impl From<&Value> for Type { } } +impl From for Type { + fn from(value: Value) -> Type { + Type::from(&value) + } +} + impl Type { pub fn is_unkown(&self) -> bool { match self { @@ -188,10 +194,6 @@ impl Value { _ => false, } } - - fn as_type(&self) -> Type { - Type::from(self) - } } #[derive(Clone, Debug)] -- cgit v1.2.1