diff options
author | Conrad Ludgate <conradludgate@gmail.com> | 2021-11-22 14:00:10 +0000 |
---|---|---|
committer | Conrad Ludgate <conradludgate@gmail.com> | 2021-11-23 07:40:53 +0000 |
commit | 11296ae50625053a64dbc7210dff814899879d0f (patch) | |
tree | d377f13881451f0b27eace0be61d0466ecb7c9e7 /src/config.rs | |
parent | 3b60b9f5575ae60a672f006040707af423f67390 (diff) |
rename try_into to try_deserialize to avoid confusion
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<T> { + pub fn try_deserialize<'de, T: Deserialize<'de>>(self) -> Result<T> { 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<T> { - self.try_into() + self.try_deserialize() } } |