mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 07:13:08 +00:00
clippy suggestions
This commit is contained in:
parent
1dd77d6d27
commit
ed8bcf9d74
@ -188,7 +188,7 @@ fn test_add_bignum(a: BigUint, b: BigUint, expected_output: BigUint) -> Result<(
|
||||
fn test_addmul_bignum(a: BigUint, b: BigUint, c: u128, expected_output: BigUint) -> Result<()> {
|
||||
let len = bignum_len(&a).max(bignum_len(&b));
|
||||
let mut memory = pad_bignums(&[a, b], len);
|
||||
memory.splice(len..len, vec![0.into(); 2].iter().cloned());
|
||||
memory.splice(len..len, [0.into(); 2].iter().cloned());
|
||||
|
||||
let a_start_loc = 0;
|
||||
let b_start_loc = len + 2;
|
||||
|
||||
@ -109,7 +109,7 @@ fn test_log_4() -> Result<()> {
|
||||
let logs_entry = KERNEL.global_labels["log_n_entry"];
|
||||
let address: Address = thread_rng().gen();
|
||||
let num_topics = U256::from(4);
|
||||
let topics = vec![45.into(), 46.into(), 47.into(), 48.into()];
|
||||
let topics = [45.into(), 46.into(), 47.into(), 48.into()];
|
||||
let data_len = U256::from(1);
|
||||
let data_offset = U256::from(2);
|
||||
|
||||
@ -170,7 +170,7 @@ fn test_log_5() -> Result<()> {
|
||||
let logs_entry = KERNEL.global_labels["log_n_entry"];
|
||||
let address: Address = thread_rng().gen();
|
||||
let num_topics = U256::from(5);
|
||||
let topics = vec![1.into(), 2.into(), 3.into(), 4.into(), 5.into()];
|
||||
let topics = [1.into(), 2.into(), 3.into(), 4.into(), 5.into()];
|
||||
let data_len = U256::from(0);
|
||||
let data_offset = U256::from(0);
|
||||
|
||||
|
||||
@ -423,7 +423,7 @@ fn test_mpt_insert_receipt() -> Result<()> {
|
||||
}
|
||||
|
||||
// stack: transaction_nb, value_ptr, retdest
|
||||
let initial_stack = vec![retdest, cur_trie_data.len().into(), 0.into()];
|
||||
let initial_stack = [retdest, cur_trie_data.len().into(), 0.into()];
|
||||
for i in 0..initial_stack.len() {
|
||||
interpreter.push(initial_stack[i]);
|
||||
}
|
||||
@ -487,7 +487,7 @@ fn test_mpt_insert_receipt() -> Result<()> {
|
||||
|
||||
// Get updated TrieData segment.
|
||||
cur_trie_data = interpreter.get_memory_segment(Segment::TrieData);
|
||||
let initial_stack2 = vec![retdest, cur_trie_data.len().into(), 1.into()];
|
||||
let initial_stack2 = [retdest, cur_trie_data.len().into(), 1.into()];
|
||||
for i in 0..initial_stack2.len() {
|
||||
interpreter.push(initial_stack2[i]);
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ fn add_data_write<F, const D: usize>(
|
||||
where
|
||||
F: RichField + Extendable<D>,
|
||||
{
|
||||
let mut row = vec![F::ZERO; 13];
|
||||
let mut row = [F::ZERO; 13];
|
||||
row[0] = F::ZERO; // is_read
|
||||
row[1] = F::ZERO; // context
|
||||
row[2] = segment;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user