From 11296ae50625053a64dbc7210dff814899879d0f Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Mon, 22 Nov 2021 14:00:10 +0000 Subject: rename try_into to try_deserialize to avoid confusion --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 55844ce..864c0ec 100644 --- a/src/config.rs +++ b/src/config.rs @@ -190,7 +190,7 @@ impl Config { } /// Attempt to deserialize the entire configuration into the requested type. - pub fn try_into<'de, T: Deserialize<'de>>(self) -> Result { + pub fn try_deserialize<'de, T: Deserialize<'de>>(self) -> Result { T::deserialize(self) } @@ -201,9 +201,9 @@ impl Config { Ok(serializer.output) } - #[deprecated(since = "0.7.0", note = "please use 'try_into' instead")] + #[deprecated(since = "0.7.0", note = "please use 'try_deserialize' instead")] pub fn deserialize<'de, T: Deserialize<'de>>(self) -> Result { - self.try_into() + self.try_deserialize() } } -- cgit v1.2.3