Explorar o código

fix: rename variable and remove unneeded fn parameter in details

PThorpe92 %!s(int64=2) %!d(string=hai) anos
pai
achega
8def9e3d16
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      src/output/details.rs

+ 2 - 3
src/output/details.rs

@@ -227,9 +227,8 @@ impl<'a> Render<'a> {
         w: &mut impl Write,
         row: &TextCell,
         header: &Option<TextCell>,
-        file_num: usize,
     ) -> io::Result<()> {
-        let mut j: usize = 0;
+        let mut header_idx: usize = 0;
         for (i, cell) in row.contents.iter().enumerate() {
             if cell.is_empty() || cell.trim().is_empty() {
                 continue;
@@ -257,7 +256,7 @@ impl<'a> Render<'a> {
         let (row, depth) = iter.next().unwrap();
         self.print_row_contents(w, &row, header)?;
         writeln!(w, ", \"depth\": {}", depth.depth.0)?;
-        writeln!(w, ", \"current\": {}", current_depth)?;
+        writeln!(w, ", \"current\": {current_depth}")?;
         if depth.depth.0 as i32 > current_depth {
             writeln!(w, ", \"children\": [{{")?;
             writeln!(w, "}}]")?;