fix clippy
This commit is contained in:
1 parent
b6ea722d94
commit
330950140c
3 files changed
+3
-3
No files matched your search
@@ -7,7 +7,7 @@ use syn::{visit::Visit, File, Macro};
|
||||
|
||||
type CollectedMacro<'a> = &'a Macro;
|
||||
|
||||
pub fn collect_from_file<'a, 'b>(file: &'a File, macros: &'b mut Vec<CollectedMacro<'a>>) {
|
||||
pub fn collect_from_file<'a>(file: &'a File, macros: &mut Vec<CollectedMacro<'a>>) {
|
||||
MacroCollector::visit_file(&mut MacroCollector { macros }, file);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ impl Writer<'_> {
|
||||
let first_line = &self.src[start.line - 1];
|
||||
write!(self.out, "{}", &first_line[start.column - 1..].trim_start())?;
|
||||
|
||||
let prev_block_indent_level = crate::leading_whitespaces(&first_line) / 4;
|
||||
let prev_block_indent_level = crate::leading_whitespaces(first_line) / 4;
|
||||
|
||||
for (id, line) in self.src[start.line..end.line].iter().enumerate() {
|
||||
writeln!(self.out)?;
|
||||
|
||||
@@ -72,7 +72,7 @@ pub fn fmt_file(contents: &str) -> Vec<FormattedBlock> {
|
||||
|
||||
let rsx_start = macro_path.span().start();
|
||||
|
||||
writer.out.indent = leading_whitespaces(&writer.src[rsx_start.line - 1]) / 4;
|
||||
writer.out.indent = leading_whitespaces(writer.src[rsx_start.line - 1]) / 4;
|
||||
|
||||
write_body(&mut writer, &body);
|
||||
|
||||
|
||||
Reference in new issue
Block a user