From c26a941541ccd7733f7533372da71f0a5be36ed5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 14 Mar 2021 09:26:51 +0100 Subject: Rename try_into/try_from Because of the clash in names with the TryInto and TryFrom traits, we're renaming the functions here to try_serialize/try_deserialize. Signed-off-by: Matthias Beyer --- tests/defaults.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/defaults.rs') diff --git a/tests/defaults.rs b/tests/defaults.rs index c50dd65..779dfdd 100644 --- a/tests/defaults.rs +++ b/tests/defaults.rs @@ -22,14 +22,14 @@ impl Default for Settings { #[test] fn set_defaults() { let c = Config::new(); - let s: Settings = c.try_into().expect("Deserialization failed"); + let s: Settings = c.try_deserialize().expect("Deserialization failed"); assert_eq!(s.db_host, "default"); } #[test] fn try_from_defaults() { - let c = Config::try_from(&Settings::default()).expect("Serialization failed"); - let s: Settings = c.try_into().expect("Deserialization failed"); + let c = Config::try_serialize(&Settings::default()).expect("Serialization failed"); + let s: Settings = c.try_deserialize().expect("Deserialization failed"); assert_eq!(s.db_host, "default"); } -- cgit v1.2.3