Skip to content

Commit

Permalink
chore: fix warning by lint
Browse files Browse the repository at this point in the history
  • Loading branch information
linux-china committed Dec 10, 2023
1 parent 713d31b commit 3314c5b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/common/pyproject.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::any::Any;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;

Expand Down
4 changes: 2 additions & 2 deletions src/polyglot/sdkman.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn is_available() -> bool {
}

pub fn init_env() {
let mut sdkmanrc_file = File::open(".sdkmanrc").unwrap();
let sdkmanrc_file = File::open(".sdkmanrc").unwrap();
let sdkman_map = java_properties::read(BufReader::new(sdkmanrc_file)).unwrap();
let candidates_home = dirs::home_dir().unwrap().join(".sdkman").join("candidates");
//iterate over the sdkman_map
Expand All @@ -37,7 +37,7 @@ pub fn init_env() {
}

pub fn diagnose() -> i32 {
let mut sdkmanrc_file = File::open(".sdkmanrc").unwrap();
let sdkmanrc_file = File::open(".sdkmanrc").unwrap();
let sdkman_map = java_properties::read(BufReader::new(sdkmanrc_file)).unwrap();
let candidates_home = dirs::home_dir().unwrap().join(".sdkman").join("candidates");
let mut problems_count = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/runners/poetry.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::process::Output;
use crate::errors::KeeperError;
use crate::models::Task;
use crate::command_utils::{run_command, capture_command_output};
use crate::command_utils::{run_command};
use crate::task;
use error_stack::{Result};
use which::which;
Expand All @@ -10,7 +10,7 @@ use crate::common::pyproject_toml_has_tool;

pub fn is_available() -> bool {
std::env::current_dir()
.map(|dir| pyproject_toml_has_tool("poetry"))
.map(|_dir| pyproject_toml_has_tool("poetry"))
.unwrap_or(false)
}

Expand Down
2 changes: 1 addition & 1 deletion src/runners/rye.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::process::Output;
use crate::errors::KeeperError;
use crate::models::Task;
use crate::command_utils::{run_command, capture_command_output};
use crate::command_utils::{run_command};
use crate::task;
use error_stack::{Result};
use which::which;
Expand Down

0 comments on commit 3314c5b

Please sign in to comment.