Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstam committed Dec 12, 2024
1 parent ab2d788 commit 561a220
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 3 additions & 2 deletions crates/sdk/src/local/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ impl LocalProver {

pub struct LocalProverBuilder {}

#[allow(clippy::new_without_default)]
impl LocalProverBuilder {
/// Creates a new local prover builder.
pub fn new() -> Self {
Expand Down Expand Up @@ -141,6 +142,7 @@ impl<'a> LocalProofRequest<'a> {
self
}

#[allow(clippy::too_many_arguments)]
fn run_inner(
prover: &SP1Prover<DefaultProverComponents>,
pk: &SP1ProvingKey,
Expand Down Expand Up @@ -247,13 +249,12 @@ impl<'a> LocalProofRequest<'a> {
impl Prover for LocalProver {
async fn setup(&self, elf: Arc<[u8]>) -> Arc<SP1ProvingKey> {
let prover = Arc::clone(&self.prover);
let result = task::spawn_blocking(move || {
task::spawn_blocking(move || {
let (pk, _vk) = prover.setup(&elf);
Arc::new(pk)
})
.await
.unwrap();
result
}

#[cfg(feature = "blocking")]
Expand Down
7 changes: 1 addition & 6 deletions crates/sdk/src/network-v2/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use tonic::{
use sp1_core_machine::io::SP1Stdin;
use sp1_prover::{HashableKey, SP1VerifyingKey};

use crate::mode::Mode;
use crate::network_v2::proto::artifact::{
artifact_store_client::ArtifactStoreClient, CreateArtifactRequest,
};
Expand Down Expand Up @@ -49,11 +48,7 @@ impl NetworkClient {
.build()
.unwrap();

Self {
signer,
http: http_client.into(),
rpc_url: DEFAULT_PROVER_NETWORK_RPC.to_string(),
}
Self { signer, http: http_client.into(), rpc_url: DEFAULT_PROVER_NETWORK_RPC.to_string() }
}

/// Update the RPC URL for the client.
Expand Down
6 changes: 3 additions & 3 deletions crates/sdk/src/network-v2/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ impl NetworkProver {
}
}

#[allow(clippy::new_without_default)]
impl NetworkProverBuilder {
/// Creates a new network prover builder.
pub fn new() -> Self {
Expand Down Expand Up @@ -377,13 +378,12 @@ impl<'a> NetworkProofRequest<'a> {
impl Prover for NetworkProver {
async fn setup(&self, elf: Arc<[u8]>) -> Arc<SP1ProvingKey> {
let prover = Arc::clone(&self.prover);
let result = task::spawn_blocking(move || {
task::spawn_blocking(move || {
let (pk, _vk) = prover.setup(&elf);
Arc::new(pk)
})
.await
.unwrap();
result
.unwrap()
}

#[cfg(feature = "blocking")]
Expand Down

0 comments on commit 561a220

Please sign in to comment.