Skip to content

Commit

Permalink
Added Readable Byte Stream Teeing
Browse files Browse the repository at this point in the history
Fixed Byte Stream Pulling
Fixed Byte Stream Lengths and Offsets
Fixed TypedArray Formatting
  • Loading branch information
Redfire75369 committed Feb 20, 2024
1 parent 78aaa4a commit c1734f4
Show file tree
Hide file tree
Showing 5 changed files with 699 additions and 339 deletions.
6 changes: 5 additions & 1 deletion ion/src/format/typedarray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ where
") [".color(colour)
)?;

if elements.is_empty() {
return "]".color(colour).fmt(f);
}

let indent = indent_str((self.cfg.indentation + self.cfg.depth + 1) as usize);
f.write_str(NEWLINE)?;
indent.fmt(f)?;
Expand All @@ -142,7 +146,7 @@ where
}

f.write_str(NEWLINE)?;
"}".color(colour).fmt(f)?;
"]".color(colour).fmt(f)?;

Ok(())
}
Expand Down
Loading

0 comments on commit c1734f4

Please sign in to comment.