fn file_count(file_name: &str) -> (u32, u32, u32) {
    let contents = fs::read_to_string(file_name).expect("Something went wrong reading the file");

    let mut characters = 0;
    let mut blanks = 0;
    let mut lines = 1;

    for c in contents.chars() {
        if c == '\n' {
            lines += 1;
        } else if c == ' ' {
            blanks += 1;
        }

        characters += 1;
    }

    (characters, blanks, lines)
}
/// counts the number of characters blanks and lines in a file
/// 
/// # Arguments
/// * `file_name` -  the name of the file to count blanks and lines in
/// 
/// # Returns
/// * the number of characters in the file
/// * the number of blanks in the file
/// * the number of lines in the file
counts the number of characters blanks and lines in a file
counts the number of characters blanks and lines in a file
fn file_count(file_name: &str) -> (u32, u32, u32) {
    let contents = fs::read_to_string(file_name).expect("Something went wrong reading the file");
    let mut characters = 0;
    let mut blanks = 0;
    let mut lines = 1;
    for c in contents.chars() {
        if c == '\n' {
            lines += 1;
        } else if c == ' ' {
            blanks += 1;
        }
        characters += 1;
    }
    (characters, blanks, lines)
}
fn file_count ( file_name : & str ) -> ( u32 , u32 , u32 ) { let contents = fs :: read_to_string ( file_name ) . expect ( " " ) ; let mut characters = 0 ; let mut blanks = 0 ; let mut lines = 1 ; for c in contents . chars ( ) { if c == '\n' { lines += 1 ; } else if c == ' ' { blanks += 1 ; } characters += 1 ; } ( characters , blanks , lines ) }
counts the number of characters blanks and lines in a file
counts the number of characters blanks and lines in a file
file_name
&str
the number of characters in the file
the number of blanks in the file
the number of lines in the file
the number of characters in the file the number of blanks in the file the number of lines in the file
file_name
&str