fix lints

This commit is contained in:
Collin Jackson 2024-11-08 13:37:55 -08:00
parent 14cefed23b
commit 2ee606c951
3 changed files with 22 additions and 26 deletions

View File

@ -44,7 +44,7 @@ pub fn track(
let client = reqwest::Client::new();
let _ = client
.post("https://api.mixpanel.com/track?ip=1")
.body(format!("[{}]", body.to_string()))
.body(format!("[{}]", body))
.header(ACCEPT, "text/plain")
.header(CONTENT_TYPE, "application/json")
.send()

View File

@ -1,7 +1,7 @@
#[cfg(debug_assertions)]
pub fn analytics_token(_ws_addr_string: &str) -> String {
// Use one of the tokens in the release version if debugging analytics
return "".into();
"".into()
}
#[cfg(not(debug_assertions))]

View File

@ -118,7 +118,7 @@ async fn main() {
contents: Some(prover_request::Contents::Registration(
ProverRequestRegistration {
prover_type: ProverType::Volunteer.into(),
prover_id: prover_id.clone().into(),
prover_id: prover_id.clone(),
estimated_proof_cycles_hertz: None,
},
)),
@ -127,8 +127,7 @@ async fn main() {
let mut retries = 0;
let max_retries = 5;
loop {
if let Err(e) = client
while let Err(e) = client
.send(Message::Binary(registration.encode_to_vec()))
.await
{
@ -147,9 +146,6 @@ async fn main() {
// Add a delay before retrying
tokio::time::sleep(tokio::time::Duration::from_secs(u64::pow(2, retries))).await;
} else {
break;
}
}
track(
@ -188,7 +184,7 @@ async fn main() {
);
let mut vm: NexusVM<MerkleTrie> =
parse_elf(&elf_bytes.as_ref()).expect("error loading and parsing RISC-V instruction");
parse_elf(elf_bytes.as_ref()).expect("error loading and parsing RISC-V instruction");
vm.syscalls.set_input(&input);
// TODO(collinjackson): Get outputs
@ -252,10 +248,10 @@ async fn main() {
completed_fraction = steps_proven as f32 / steps_to_prove as f32;
let progress = ProverRequest {
contents: Some(prover_request::Contents::Progress(Progress {
completed_fraction: completed_fraction,
completed_fraction,
steps_in_trace: total_steps as i32,
steps_to_prove: steps_to_prove as i32,
steps_proven: steps_proven as i32,
steps_proven,
})),
};
let progress_duration = SystemTime::now().duration_since(progress_time).unwrap();