pub fn summarise(&self) -> Language {
        let mut summary = self.clone();

        for reports in self.children.values() {
            for stats in reports.iter().map(|r| r.stats.summarise()) {
                summary.comments += stats.comments;
                summary.code += stats.code;
                summary.blanks += stats.blanks;
            }
        }

        summary
    }
/// Creates a new `Language` from `self`, which is a summarised version
/// of the language that doesn't contain any children. It will count
/// non-blank lines in child languages as code unless the child language is
/// considered "literate" then it will be counted as comments.
Creates a new `Language` from `self`, which is a summarised version
of the language that doesn't contain any children. It will count
non-blank lines in child languages as code unless the child language is
considered "literate" then it will be counted as comments.
Creates a new ` Language ` from ` self ` which is a summarised version of the language that doesn ' t contain any children . It will count non - blank lines in child languages as code unless the child language is considered " literate " then it will be counted as comments .
pub fn summarise(&self) -> Language {
        let mut summary = self.clone();
        for reports in self.children.values() {
            for stats in reports.iter().map(|r| r.stats.summarise()) {
                summary.comments += stats.comments;
                summary.code += stats.code;
                summary.blanks += stats.blanks;
            }
        }
        summary
    }
pub fn summarise ( & self ) -> Language { let mut summary = self . clone ( ) ; for reports in self . children . values ( ) { for stats in reports . iter ( ) . map ( | r | r . stats . summarise ( ) ) { summary . comments += stats . comments ; summary . code += stats . code ; summary . blanks += stats . blanks ; } } summary }
Creates a new `Language` from `self`, which is a summarised version
of the language that doesn't contain any children.
Creates a new ` Language ` from ` self ` which is a summarised version of the language that doesn ' t contain any children .
&self
&self