Skip to content

Commit

Permalink
Cargo Clippy Lints
Browse files Browse the repository at this point in the history
  • Loading branch information
LimesKey committed Oct 28, 2023
1 parent 762b0bd commit 25f8653
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion password-llm-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async fn download_rockyou() -> Result<(), Box<dyn std::error::Error>> {
write!(lock, "Downloading rockyou.txt: {}/{} bytes\r", written, file_size)?;
}
writer.flush()?;
print!("\n");
println!();

std::fs::File::create(ROCKYOU_PATH.join("rockyou_check"))?;
Ok(())
Expand Down
6 changes: 3 additions & 3 deletions password-llm/src/gpu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl GpuStats {
pub fn list_gpus() -> Result<Vec<Device>, ClError> {
Ok(get_all_devices(CL_DEVICE_TYPE_GPU)?
.into_iter()
.map(|e| Device::new(e))
.map(Device::new)
.collect())
}

Expand All @@ -40,7 +40,7 @@ pub fn obtain_stats_from_device(device: &opencl3::device::Device, workflow: bool

let mut gpu: GpuStats = GpuStats {
name: device.name().unwrap(),
clock: clock,
clock,
cuda_cores: cores,
smp: cores * 8,
gflops_fp32: 0,
Expand All @@ -61,5 +61,5 @@ pub fn obtain_stats_from_index(device_index: usize, workflow: bool) -> Result<Op
let devices = list_gpus()?;
let device = devices[device_index];

Ok(obtain_stats_from_device(&device, workflow)?)
obtain_stats_from_device(&device, workflow)
}
2 changes: 1 addition & 1 deletion password-llm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ async fn check_dictionary(password: String, dictionary: File) -> bool {

println!("Failed to read {} lines in rockyou.txt", errors);

return false;
false
}

fn regex_match(password: String) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async fn evaluate_password_strength(password: String, gpu_index: usize, handle:

let file = std::fs::File::open(&resource_path).unwrap();

Ok(password_llm::evaluate_password_strength(password, file, Some(gpu_index)).await?)
password_llm::evaluate_password_strength(password, file, Some(gpu_index)).await
}

#[tauri::command]
Expand Down

0 comments on commit 25f8653

Please sign in to comment.