Skip to content

Commit

Permalink
fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nnh12 committed Dec 6, 2024
1 parent 52d62c8 commit 179e743
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions applications/shell/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ impl Shell {
}

fn execute_internal_less(&mut self, args: Vec<&str>) -> Result<(), &'static str> {
if args.len() < 1 {
if args.is_empty() {
self.terminal.lock().print_to_terminal("not enough arguments provided.\n".to_string());
self.clear_cmdline(false)?;
self.redisplay_prompt();
Expand Down Expand Up @@ -1509,7 +1509,7 @@ impl Shell {
};

let prompt = self.env.lock().working_dir.lock().get_absolute_path();
let full_path = format!("{}/{}", prompt.to_string(), file_path.to_string());
let full_path = format!("{}/{}", prompt, file_path);
let path = Path::new(full_path.as_str());

// navigate to the filepath specified by first argument
Expand Down Expand Up @@ -1545,7 +1545,7 @@ impl Shell {
}
},
None => {
self.terminal.lock().print_to_terminal(format!("Path not found: {}\n", path.to_string()).to_string());
self.terminal.lock().print_to_terminal(format!("Path not found: {}\n", path).to_string());
Ok("".to_string()) // Example: return empty string or a default value
}
}
Expand Down

0 comments on commit 179e743

Please sign in to comment.