diff --git a/src/dsn/de.rs b/src/dsn/de.rs index bb4fb80..cda0736 100644 --- a/src/dsn/de.rs +++ b/src/dsn/de.rs @@ -611,7 +611,12 @@ impl<'de, 'a> SeqAccess<'de> for StructFields<'a, 'de> { // TODO explain this part of empty option detection if let Some(lookahead) = self.de.next_name_lookahead() { if lookahead != self.fields[self.current_field] { - self.de.next_option_empty_hint = true; + if lookahead + "s" != self.fields[self.current_field] { + self.de.next_option_empty_hint = true; + } + else { + self.de.next_option_empty_hint = false; + } } else { self.de.next_option_empty_hint = false; } diff --git a/src/dsn/structure.rs b/src/dsn/structure.rs index 23c821e..b283b84 100644 --- a/src/dsn/structure.rs +++ b/src/dsn/structure.rs @@ -171,9 +171,24 @@ pub struct Attach(pub bool); #[derive(Deserialize, Debug)] #[serde(rename = "network")] pub struct Network { + pub nets: Option>, pub classes: Vec, } +#[derive(Deserialize, Debug)] +#[serde(rename = "net")] +// dsn names this "net", but it's a structure unrelated to "net" in wiring or elsewhere +pub struct NetPinAssignments { + pub net: String, + pub pins: Vec, +} + +#[derive(Deserialize, Debug)] +#[serde(rename = "pins")] +pub struct Pins { + pub ids: Vec, +} + #[derive(Deserialize, Debug)] #[serde(rename = "class")] pub struct Class {