Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuma140902 committed Nov 10, 2023
1 parent c13830f commit 1a92c9f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,13 @@ impl Display for Store {
for (k, v) in &self.0 {
f.write_fmt(format_args!("{} = ", k))?;
match v {
Value::Bytes(bytes) => f.write_fmt(format_args!(
"Bytes([{} ...])\n",
bytes
.iter()
.take(20)
.map(|i| format!("{}, ", i))
.collect::<String>()
))?,
Value::Bytes(bytes) => {
f.write_str("Bytes([")?;
for byte in bytes.iter().take(20) {
f.write_fmt(format_args!("{}, ", byte))?;
}
f.write_str("...])\n")?;
}
Value::Template(_) => f.write_str("(compiled template)\n")?,
Value::JSON(json) => f.write_fmt(format_args!("{:#?}", json))?,
}
Expand Down

0 comments on commit 1a92c9f

Please sign in to comment.