mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
Small refactor
This commit is contained in:
parent
d5494e58a4
commit
9b3a561e83
@ -300,15 +300,15 @@ impl<'de, 'a> de::Deserializer<'de> for &'a mut ConfigDeserializer<'de> {
|
||||
self.stack
|
||||
);
|
||||
|
||||
if self.saw_root {
|
||||
let value = self.pop();
|
||||
let name = std::any::type_name::<V::Value>();
|
||||
trace!("Extracting {:?} for {:?}", value.val, name);
|
||||
V::Value::extract(&value.val)
|
||||
} else {
|
||||
if !self.saw_root {
|
||||
self.saw_root = true;
|
||||
visitor.visit_seq(StructDeserializer::new(&mut self, fields))
|
||||
return visitor.visit_seq(StructDeserializer::new(&mut self, fields));
|
||||
}
|
||||
|
||||
let value = self.pop();
|
||||
let name = std::any::type_name::<V::Value>();
|
||||
trace!("Extracting {:?} for {:?}", value.val, name);
|
||||
V::Value::extract(&value.val)
|
||||
}
|
||||
fn deserialize_enum<V>(
|
||||
self,
|
||||
|
Loading…
Reference in New Issue
Block a user