fn fmt()

in src/reader.rs [318:366]


    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        for fun in &self.functions {
            writeln!(
                f,
                "===== {} ({}) @ {}:{}",
                fun.name, fun.identifier, fun.file_name, fun.start_line
            )?;
            for block in &fun.blocks {
                writeln!(f, "Block : {} Counter : {}", block.no, block.counter)?;
                if let Some((last, elmts)) = block.source.split_last() {
                    write!(f, "\tSource Edges : ")?;
                    for edge in elmts.iter().map(|i| &fun.edges[*i]) {
                        write!(f, "{} ({}), ", edge.source, edge.counter)?;
                    }
                    let edge = &fun.edges[*last];
                    writeln!(f, "{} ({}), ", edge.source, edge.counter)?;
                }
                if let Some((last, elmts)) = block.destination.split_last() {
                    write!(f, "\tDestination Edges : ")?;
                    for edge in elmts.iter().map(|i| &fun.edges[*i]) {
                        write!(
                            f,
                            "{}{} ({}), ",
                            edge.get_tree_mark(),
                            edge.destination,
                            edge.counter
                        )?;
                    }
                    let edge = &fun.edges[*last];
                    writeln!(
                        f,
                        "{}{} ({}), ",
                        edge.get_tree_mark(),
                        edge.destination,
                        edge.counter
                    )?;
                }
                if let Some((last, elmts)) = block.lines.split_last() {
                    write!(f, "\tLines : ")?;
                    for i in elmts {
                        write!(f, "{},", i)?;
                    }
                    writeln!(f, "{},", last)?;
                }
            }
        }

        Ok(())
    }