Skip to content

Commit

Permalink
deps: toml_edit 0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Dec 2, 2022
1 parent c36301c commit 8f93d2f
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 126 deletions.
200 changes: 77 additions & 123 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ nom = "5"
serde = "1.0"
serde_json = "1.0"
structopt = "0.3"
toml_edit = "0.1"
toml_edit = "0.3"
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn print_toml_fragment(doc: &Document, tpath: &[TpathSegment]) -> () {
let mut next = a.clone();
next.clear();
match item {
Item::Table(t) => { next.append(t); },
Item::Table(t) => { next.push(t); },
_ => panic!("malformed TOML parse-tree"),
}
item = Item::ArrayOfTables(next);
Expand Down Expand Up @@ -243,7 +243,7 @@ impl Serialize for JsonValue<'_> {
v.serialize(serializer)
} else if let Some(v) = self.0.as_str() {
v.serialize(serializer)
} else if let Some(_) = self.0.as_date_time() {
} else if let Some(_) = self.0.as_datetime() {
"UNIMPLEMENTED: DateTime".serialize(serializer) // TODO
} else if let Some(arr) = self.0.as_array() {
let mut seq = serializer.serialize_seq(Some(arr.len()))?;
Expand Down

0 comments on commit 8f93d2f

Please sign in to comment.