Skip to content

Commit

Permalink
Clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jan 11, 2023
1 parent 4b9d4ac commit b1959d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions barretenberg_wrapper/src/composer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pub unsafe fn get_circuit_size(cs_prt: *const u8) -> u32 {
// TODO test with a circuit of size 2^19 cf: https://github.com/noir-lang/noir/issues/12
}

/// # Safety
/// cs_prt must point to a valid constraints system structure of type standard_format
pub unsafe fn get_exact_circuit_size(cs_prt: *const u8) -> u32 {
standard_example__get_exact_circuit_size(cs_prt)
}
Expand Down
4 changes: 2 additions & 2 deletions barretenberg_wrapper/src/pedersen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn compress_many(inputs: &[[u8; 32]]) -> [u8; 32] {
let mut buffer = Vec::new();
let witness_len = inputs.len() as u32;
buffer.extend_from_slice(&witness_len.to_be_bytes());
for assignment in &*inputs {
for assignment in inputs {
buffer.extend_from_slice(assignment);
}

Expand All @@ -40,7 +40,7 @@ pub fn encrypt(inputs_buffer: &[[u8; 32]]) -> ([u8; 32], [u8; 32]) {
let buffer_len = inputs_buffer.len() as u32;
let mut result = [0_u8; 64];
buffer.extend_from_slice(&buffer_len.to_be_bytes());
for e in &*inputs_buffer {
for e in inputs_buffer {
buffer.extend_from_slice(e);
}

Expand Down

0 comments on commit b1959d3

Please sign in to comment.