Skip to content

Commit b625883

Browse files
committed
chore: address lints in emmylua_code_style
1 parent 93a732d commit b625883

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

crates/emmylua_code_style/src/bin/emmylua_format.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,9 @@ fn main() {
134134
}
135135
}
136136
} else if args.write {
137-
if changed {
138-
if let Err(e) = fs::write(path, formatted) {
139-
eprintln!("Failed to write {}: {e}", path.to_string_lossy());
140-
exit_code = 2;
141-
}
137+
if changed && let Err(e) = fs::write(path, formatted) {
138+
eprintln!("Failed to write {}: {e}", path.to_string_lossy());
139+
exit_code = 2;
142140
}
143141
} else if let Some(out) = &args.output {
144142
if let Err(e) = fs::write(out, formatted) {

crates/emmylua_code_style/src/test/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[allow(clippy::module_inception)]
12
#[cfg(test)]
23
mod test {
34
use crate::{reformat_lua_code, styles::LuaCodeStyle};

0 commit comments

Comments
 (0)