Skip to content

Commit

Permalink
fix: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
BC-A committed Oct 30, 2024
1 parent a7cc06f commit cb7b455
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dsl_compile/src/parser_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn parse_project(input_info: &Input) -> Result<ProgramArchive> {
initial_file,
CIRCOM_VERSION,
input_info.link_libraries.clone(),
&BigInt::default()
&BigInt::default(),
);
match result_program_archive {
Err((file_library, report_collection)) => {
Expand Down
4 changes: 2 additions & 2 deletions starky/benches/perf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct FlamegraphProfiler<'a> {
active_profiler: Option<ProfilerGuard<'a>>,
}

impl<'a> FlamegraphProfiler<'a> {
impl FlamegraphProfiler<'_> {
#[allow(dead_code)]
pub fn new(frequency: c_int) -> Self {
FlamegraphProfiler {
Expand All @@ -17,7 +17,7 @@ impl<'a> FlamegraphProfiler<'a> {
}
}

impl<'a> Profiler for FlamegraphProfiler<'a> {
impl Profiler for FlamegraphProfiler<'_> {
fn start_profiling(&mut self, _benchmark_id: &str, _benchmark_dir: &Path) {
self.active_profiler = Some(ProfilerGuard::new(self.frequency).unwrap());
}
Expand Down
2 changes: 1 addition & 1 deletion starky/src/field_bls12381.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl<'de> Deserialize<'de> for Fr {
{
struct EntriesVisitor;

impl<'de> Visitor<'de> for EntriesVisitor {
impl Visitor<'_> for EntriesVisitor {
type Value = Fr;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion starky/src/field_bn128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl<'de> Deserialize<'de> for Fr {
{
struct EntriesVisitor;

impl<'de> Visitor<'de> for EntriesVisitor {
impl Visitor<'_> for EntriesVisitor {
type Value = Fr;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion starky/src/linearhash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl LinearHash {
return Ok(ElementDigest::<4, FGL>::new(&st));
}

let hsz = (flatvals.len() + bs - 1) / bs;
let hsz = flatvals.len().div_ceil(bs);
let mut hashes: Vec<FGL> = vec![FGL::ZERO; hsz * 4];
// NOTE flatsvals.len <= hashes.len
hashes
Expand Down
4 changes: 2 additions & 2 deletions starky/src/stark_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ pub struct StarkProof<M: MerkleTree> {
pub prover_addr: String,
}

impl<'a, M: MerkleTree> StarkProof<M> {
impl<M: MerkleTree> StarkProof<M> {
#[allow(clippy::too_many_arguments, clippy::type_complexity)]
#[time_profiler()]
pub fn stark_gen<T: Transcript>(
cm_pols: PolsArray,
const_pols: PolsArray,
const_tree: &M,
starkinfo: &'a StarkInfo,
starkinfo: &StarkInfo,
program: &Program,
_pil: &PIL,
stark_struct: &StarkStruct,
Expand Down

0 comments on commit cb7b455

Please sign in to comment.