diff --git a/benches/diff_bench.rs b/benches/diff_bench.rs index 3cd4217d1..fff6b3068 100644 --- a/benches/diff_bench.rs +++ b/benches/diff_bench.rs @@ -1,6 +1,5 @@ use bencher::{benchmark_group, benchmark_main, Bencher}; use criterion_bencher_compat as bencher; - use jujutsu_lib::diff; fn unchanged_lines(count: usize) -> (String, String) { diff --git a/lib/src/index.rs b/lib/src/index.rs index c32a4cad7..10cc4950a 100644 --- a/lib/src/index.rs +++ b/lib/src/index.rs @@ -34,7 +34,6 @@ use thiserror::Error; use crate::backend::{ChangeId, CommitId}; use crate::commit::Commit; use crate::file_util::persist_content_addressed_temp_file; - #[cfg(not(feature = "map_first_last"))] use crate::nightly_shims::BTreeSetExt; diff --git a/lib/src/settings.rs b/lib/src/settings.rs index f4a151549..e89762724 100644 --- a/lib/src/settings.rs +++ b/lib/src/settings.rs @@ -24,7 +24,8 @@ pub struct RepoSettings { _config: config::Config, } -const TOO_MUCH_CONFIG_ERROR: &str = "Both `$HOME/.jjconfig` and `$XDG_CONFIG_HOME/jj/config.toml` were found, please remove one."; +const TOO_MUCH_CONFIG_ERROR: &str = + "Both `$HOME/.jjconfig` and `$XDG_CONFIG_HOME/jj/config.toml` were found, please remove one."; impl UserSettings { pub fn from_config(config: config::Config) -> Self { @@ -50,9 +51,12 @@ impl UserSettings { if let Some(home_dir) = dirs::home_dir() { let p = home_dir.join(".jjconfig"); - // we already loaded from the new location, prevent user confusion and make them remove the old one: + // we already loaded from the new location, prevent user confusion and make them + // remove the old one: if loaded_from_config_dir && p.exists() { - return Err(config::ConfigError::Message(TOO_MUCH_CONFIG_ERROR.to_string())); + return Err(config::ConfigError::Message( + TOO_MUCH_CONFIG_ERROR.to_string(), + )); } config.merge( config::File::from(p)