fn format_lines(
    text: &mut String,
    name: &FileName,
    skipped_range: &[NonFormattedRange],
    config: &Config,
    report: FormatReport,
) {
    let mut formatter = FormatLines::new(name, skipped_range, config);
    if let Some(false) = formatter.check_license(text) {
        report.add_license_failure(name.clone());
    }
    formatter.iterate(text);

    if formatter.newline_count > 1 {
        debug!("track truncate: {} {}", text.len(), formatter.newline_count);
        let line = text.len() - formatter.newline_count + 1;
        text.truncate(line);
    }

    report.append_errors(name.clone(), formatter.errors.into_iter());
}
// Formatting done on a char by char or line by line basis.
// FIXME(#20): other stuff for parity with make tidy.
Formatting done on a char by char or line by line basis.
FIXME(#20): other stuff for parity with make tidy.
Formatting done on a char by char or line by line basis . FIXME ( #20 ) : other stuff for parity with make tidy .
fn format_lines(
    text: &mut String,
    name: &FileName,
    skipped_range: &[NonFormattedRange],
    config: &Config,
    report: FormatReport,
) {
    let mut formatter = FormatLines::new(name, skipped_range, config);
    if let Some(false) = formatter.check_license(text) {
        report.add_license_failure(name.clone());
    }
    formatter.iterate(text);
    if formatter.newline_count > 1 {
        debug!("track truncate: {} {}", text.len(), formatter.newline_count);
        let line = text.len() - formatter.newline_count + 1;
        text.truncate(line);
    }
    report.append_errors(name.clone(), formatter.errors.into_iter());
}
fn format_lines ( text : & mut String , name : & FileName , skipped_range : & [ NonFormattedRange ] , config : & Config , report : FormatReport , ) { let mut formatter = FormatLines :: new ( name , skipped_range , config ) ; if let Some ( false ) = formatter . check_license ( text ) { report . add_license_failure ( name . clone ( ) ) ; } formatter . iterate ( text ) ; if formatter . newline_count > 1 { debug ! ( " " text len ( ) formatter newline_count ) ; let line = text . len ( ) - formatter . newline_count + 1 ; text . truncate ( line ) ; } report . append_errors ( name . clone ( ) , formatter . errors . into_iter ( ) ) ; }
Formatting done on a char by char or line by line basis.
Formatting done on a char by char or line by line basis .
text
&mut String
name
&FileName
skipped_range
&[NonFormattedRange]
config
&Config
report
FormatReport
text
&mut String
name
&FileName
skipped_range
&[NonFormattedRange]
config
&Config
report
FormatReport