diff --git a/.editorconfig b/.editorconfig index 51b58b71..5b74c262 100644 --- a/.editorconfig +++ b/.editorconfig @@ -19,6 +19,7 @@ indent_size = false [*.md] trim_trailing_whitespace = false +indent_size = 2 [*.{yml,yaml}] indent_size = 2 diff --git a/src/config/raw.rs b/src/config/raw.rs index 65c305cf..77963ed3 100644 --- a/src/config/raw.rs +++ b/src/config/raw.rs @@ -504,8 +504,10 @@ loggers: } #[cfg(windows)] + #[allow(dead_code)] const LINE_ENDING: &'static str = "\r\n"; #[cfg(not(windows))] + #[allow(dead_code)] const LINE_ENDING: &'static str = "\n"; #[test] @@ -520,7 +522,6 @@ loggers: let config_start = sample_file.find(&config_start_string).unwrap() + config_start_string.len(); let config_end = sample_file.find(&config_end_string).unwrap(); - let config_str = sample_file[config_start..config_end].trim(); let config = ::serde_yaml::from_str::(config_str);