Skip to content

Commit

Permalink
jsonbuilder: rustfmt
Browse files Browse the repository at this point in the history
Some very minor changes to formatting.
  • Loading branch information
jasonish authored and victorjulien committed May 30, 2023
1 parent c6d3b46 commit 95cfc2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/src/jsonbuilder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl JsonBuilder {
State::None => {
debug_validate_fail!("invalid state");
Err(JsonError::InvalidState)
},
}
}
}

Expand Down Expand Up @@ -334,7 +334,7 @@ impl JsonBuilder {
State::ArrayFirst => {
self.buf.push('"');
for i in 0..val.len() {
self.buf.push(HEX[(val[i] >> 4) as usize] as char);
self.buf.push(HEX[(val[i] >> 4) as usize] as char);
self.buf.push(HEX[(val[i] & 0xf) as usize] as char);
}
self.buf.push('"');
Expand All @@ -345,7 +345,7 @@ impl JsonBuilder {
self.buf.push(',');
self.buf.push('"');
for i in 0..val.len() {
self.buf.push(HEX[(val[i] >> 4) as usize] as char);
self.buf.push(HEX[(val[i] >> 4) as usize] as char);
self.buf.push(HEX[(val[i] & 0xf) as usize] as char);
}
self.buf.push('"');
Expand Down Expand Up @@ -522,7 +522,7 @@ impl JsonBuilder {
self.buf.push_str(key);
self.buf.push_str("\":\"");
for i in 0..val.len() {
self.buf.push(HEX[(val[i] >> 4) as usize] as char);
self.buf.push(HEX[(val[i] >> 4) as usize] as char);
self.buf.push(HEX[(val[i] & 0xf) as usize] as char);
}
self.buf.push('"');
Expand Down

0 comments on commit 95cfc2b

Please sign in to comment.