mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-17 06:08:26 +00:00
fix clippy
This commit is contained in:
parent
b6ea722d94
commit
330950140c
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue