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

cleanup: run rustfmt

This commit is contained in:
Martin von Zweigbergk 2022-02-27 10:58:33 -08:00
parent 88cc9ffcbc
commit 648cfd698c
3 changed files with 7 additions and 5 deletions

View file

@ -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) {

View file

@ -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;

View file

@ -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)