Skip to content

Commit

Permalink
Fix imdl torrent dump dictionary formatting (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Jan 6, 2024
1 parent 7800a9c commit 279a39b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/subcommand/torrent/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<'a> Display for Fmt<'a> {

for (i, (key, value)) in dict.iter().enumerate() {
if i > 0 {
write!(f, " ,")?;
write!(f, ", ")?;
}
fmt_string(f, key)?;
write!(f, ": ")?;
Expand Down Expand Up @@ -170,6 +170,7 @@ mod tests {

case("de", "{}\n");
case("d1:xi0ee", "{\"x\": 0}\n");
case("d1:xi0e1:yi1ee", "{\"x\": 0, \"y\": 1}\n");
case("d3:xyzd3:abci0eee", "{\"xyz\": {\"abc\": 0}}\n");
}
}

0 comments on commit 279a39b

Please sign in to comment.