Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(clippy): misc clippy fixes #1969

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/core/executor/src/dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub fn emit_memory_dependencies(
_ => unreachable!(),
};

if most_sig_mem_value_byte >> 7 & 0x01 == 1 {
if (most_sig_mem_value_byte >> 7) & 0x01 == 1 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

crates/core/executor/src/dependencies.rs:144:12
|
144 | if most_sig_mem_value_byte >> 7 & 0x01 == 1 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: (most_sig_mem_value_byte >> 7) & 0x01
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
= note: #[warn(clippy::precedence)] on by default

let sub_event = AluEvent {
pc: UNUSED_PC,
opcode: Opcode::SUB,
Expand Down
1 change: 0 additions & 1 deletion crates/core/machine/src/air/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub use word::*;
use sp1_stark::air::{BaseAirBuilder, SP1AirBuilder};

/// A trait which contains methods related to memory interactions in an AIR.

pub trait SP1CoreAirBuilder:
SP1AirBuilder + WordAirBuilder + MemoryAirBuilder + ProgramAirBuilder
{
Expand Down
2 changes: 1 addition & 1 deletion crates/core/machine/src/memory/consistency/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub struct MemoryAccessCols<T> {
/// The following columns are decomposed limbs for the difference between the current access's
/// timestamp and the previous access's timestamp. Note the actual value of the timestamp
/// is either the accesses' shard or clk depending on the value of compare_clk.

///
/// This column is the least significant 16 bit limb of current access timestamp - prev access
/// timestamp.
pub diff_16bit_limb: T,
Expand Down
4 changes: 2 additions & 2 deletions crates/recursion/core/src/air/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<T: PrimeField32> MemoryInitCols<T> {
/// NOTE: These are very similar to core/src/memory/columns.rs
/// The reason we cannot use those structs directly is that they use "shard".
/// In our recursive VM, we don't have shards, we only have `clk` (i.e. timestamp).

///
/// Memory read access.
#[derive(AlignedBorrow, Default, Debug, Clone, Copy)]
#[repr(C)]
Expand Down Expand Up @@ -94,7 +94,7 @@ pub struct MemoryAccessCols<T, TValue> {
/// The following columns are decomposed limbs for the difference between the current access's
/// timestamp and the previous access's timestamp. Note the actual value of the timestamp
/// is either the accesses' shard or clk depending on the value of compare_clk.

///
/// This column is the least significant 16 bit limb of current access timestamp - prev access
/// timestamp.
pub diff_16bit_limb: T,
Expand Down
2 changes: 1 addition & 1 deletion crates/sdk/src/network/prove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct NetworkProveBuilder<'a> {
pub(crate) cycle_limit: Option<u64>,
}

impl<'a> NetworkProveBuilder<'a> {
impl NetworkProveBuilder<'_> {
/// Set the proof kind to [`SP1ProofMode::Core`] mode.
///
/// # Details
Expand Down
2 changes: 1 addition & 1 deletion crates/zkvm/entrypoint/src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub use verify::*;

/// These codes MUST match the codes in `core/src/runtime/syscall.rs`. There is a derived test
/// that checks that the enum is consistent with the syscalls.

///
/// Halts the program.
pub const HALT: u32 = 0x00_00_00_00;

Expand Down
Loading