Skip to content

Commit 48ff34a

Browse files
committed
lint
1 parent 07bc4fb commit 48ff34a

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

src/_string_tools/slice_packed_field.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ mod test {
857857
for j in 0..18 {
858858
let start_byte: u32 = text.len() - num_bytes - byte_positions[j];
859859
let mut expected_slices: [Field; 3] =
860-
// Safety: this is a test
860+
// Safety: this is a test
861861
unsafe { build_slices_for_test(text, start_byte, num_bytes) };
862862
let result_slices: [Field; 3] =
863863
slice_fields(slices, start_byte as Field, num_bytes as Field);

src/json.nr

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,13 @@ impl<let NumBytes: u32, let NumPackedFields: u32, let MaxNumTokens: u32, let Max
267267
tokens[i] = token;
268268
// 13 gates
269269
let TokenFlags {
270-
create_json_entry,
271-
is_end_of_object_or_array,
272-
is_start_of_object_or_array,
273-
new_context,
274-
is_key_token: update_key,
275-
is_value_token,
276-
preserve_num_entries,
277-
} = TokenFlags::from_field(
270+
create_json_entry,
271+
is_end_of_object_or_array,
272+
is_start_of_object_or_array,
273+
new_context,
274+
is_key_token: update_key,
275+
is_value_token,
276+
preserve_num_entries,} = TokenFlags::from_field(
278277
TOKEN_FLAGS_TABLE[cast_num_to_u32(token) + context * NUM_TOKENS],
279278
);
280279

@@ -456,12 +455,8 @@ impl<let NumBytes: u32, let NumPackedFields: u32, let MaxNumTokens: u32, let Max
456455
// 2 gates
457456
let capture_flags = JSON_CAPTURE_TABLE[cast_num_to_u32(encoded_ascii)];
458457
// 5 gates
459-
let ScanData {
460-
scan_token,
461-
push_transcript,
462-
increase_length,
463-
is_potential_escape_sequence,
464-
} = ScanData::from_field(capture_flags);
458+
let ScanData { scan_token, push_transcript, increase_length, is_potential_escape_sequence } =
459+
ScanData::from_field(capture_flags);
465460

466461
// 2 gates
467462
let raw = raw_transcript[cast_num_to_u32(transcript_ptr)];
@@ -674,8 +669,8 @@ unconstrained fn __build_transcript<let NumBytes: u32, let MaxNumTokens: u32>(
674669
let encoded_ascii = previous_was_potential_escape_sequence as Field * 1024
675670
+ scan_mode * 256
676671
+ ascii as Field;
677-
let ScanData { scan_token, push_transcript, increase_length, is_potential_escape_sequence }
678-
= ScanData::from_field(JSON_CAPTURE_TABLE[cast_num_to_u32(encoded_ascii)]);
672+
let ScanData { scan_token, push_transcript, increase_length, is_potential_escape_sequence } =
673+
ScanData::from_field(JSON_CAPTURE_TABLE[cast_num_to_u32(encoded_ascii)]);
679674

680675
if push_transcript {
681676
let new_entry = RawTranscriptEntry::to_field(

0 commit comments

Comments
 (0)