ok/jj
1
0
Fork 0
forked from mirrors/jj

cleanup: fix some cargo clippy warnings

This commit is contained in:
Waleed Khan 2022-05-02 21:34:26 -07:00
parent 7a551e584f
commit 67be21d9cb
2 changed files with 3 additions and 3 deletions

View file

@ -197,7 +197,7 @@ impl MergeTool {
/// Loads merge tool options from `[merge-tools.<name>]`. The given name is used
/// as an executable name if no configuration found for that name.
fn get_tool(settings: &UserSettings, name: &str) -> Result<MergeTool, ConfigError> {
const TABLE_KEY: &'static str = "merge-tools";
const TABLE_KEY: &str = "merge-tools";
let tools_table = match settings.config().get_table(TABLE_KEY) {
Ok(table) => table,
Err(ConfigError::NotFound(_)) => return Ok(MergeTool::with_program(name)),

View file

@ -13,7 +13,7 @@
// limitations under the License.
use std::collections::HashSet;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::process::exit;
use clap::Parser;
@ -30,7 +30,7 @@ struct Args {
after: PathBuf,
}
fn files_recursively(dir: &PathBuf) -> HashSet<String> {
fn files_recursively(dir: &Path) -> HashSet<String> {
let mut files = HashSet::new();
for dir_entry in std::fs::read_dir(dir).unwrap() {
let dir_entry = dir_entry.unwrap();