We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93a732d commit b625883Copy full SHA for b625883
crates/emmylua_code_style/src/bin/emmylua_format.rs
@@ -134,11 +134,9 @@ fn main() {
134
}
135
136
} 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
- }
+ if changed && let Err(e) = fs::write(path, formatted) {
+ eprintln!("Failed to write {}: {e}", path.to_string_lossy());
+ exit_code = 2;
142
143
} else if let Some(out) = &args.output {
144
if let Err(e) = fs::write(out, formatted) {
crates/emmylua_code_style/src/test/mod.rs
@@ -1,3 +1,4 @@
1
+#[allow(clippy::module_inception)]
2
#[cfg(test)]
3
mod test {
4
use crate::{reformat_lua_code, styles::LuaCodeStyle};
0 commit comments