Rename deserialize_from to deserialize_in_place

This commit is contained in:
David Tolnay
2017-12-17 10:46:44 -08:00
parent 0b89bc920e
commit 56d5d7f761
7 changed files with 113 additions and 113 deletions
+5 -5
View File
@@ -195,15 +195,15 @@ where
panic!("{} remaining tokens", de.remaining());
}
// Do the same thing for deserialize_from. This isn't *great* because a no-op
// impl of deserialize_from can technically succeed here. Still, this should
// catch a lot of junk.
// Do the same thing for deserialize_in_place. This isn't *great* because a
// no-op impl of deserialize_in_place can technically succeed here. Still,
// this should catch a lot of junk.
let mut de = Deserializer::new(tokens);
match deserialized_val.deserialize_from(&mut de) {
match T::deserialize_in_place(&mut de, &mut deserialized_val) {
Ok(()) => {
assert_eq!(deserialized_val, *value);
}
Err(e) => panic!("tokens failed to deserialize_from: {}", e),
Err(e) => panic!("tokens failed to deserialize_in_place: {}", e),
}
if de.remaining() > 0 {
panic!("{} remaining tokens", de.remaining());