Skip to content

Commit

Permalink
slice: use write! macro to get rid of GH advanced security lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Apr 7, 2024
1 parent dec19eb commit c739097
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/slice.rs
Expand Up @@ -105,7 +105,7 @@ impl Args {
.collect();

// Write the opening bracket for the JSON array
json_wtr.write(b"[")?;
write!(json_wtr, "[")?;
let mut is_first = true;

let rec_len = header_vec.len().saturating_sub(1);
Expand All @@ -114,7 +114,7 @@ impl Args {
for record in records {
if !is_first {
// Write a comma before each record except the first one
json_wtr.write(b",")?;
write!(json_wtr, ",")?;
}
write!(json_wtr, "{{")?;
for (idx, b) in record.iter().enumerate() {
Expand Down

0 comments on commit c739097

Please sign in to comment.