Skip to content

Commit 469e6f2

Browse files
committed
Format
1 parent 453d028 commit 469e6f2

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/config/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ pub struct Config {
1717
impl Config {
1818
pub fn parse(cwd: &Path) -> Self {
1919
if let Some(rc_file) = find_rc_file(cwd) {
20-
let buf = fs::read_to_string(rc_file).expect("Failed to read config file");
20+
let buf = fs::read_to_string(rc_file)
21+
.expect("Failed to read config file");
2122
toml::from_str(&buf).expect("Failed to parse config file")
2223
} else {
2324
Self::default()

src/main.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,8 @@ fn format_fs(cli: &Cli, config: &Config) -> bool {
5959
let path = result.path();
6060
let buffer = fs::read_to_string(path).expect("Failed to read file");
6161

62-
let status = format(
63-
path.to_path_buf(),
64-
buffer,
65-
&mut emitter,
66-
config,
67-
cli.check,
68-
);
62+
let status =
63+
format(path.to_path_buf(), buffer, &mut emitter, config, cli.check);
6964

7065
has_errors |= status == FormattingStatus::Changed;
7166
}

0 commit comments

Comments
 (0)