fn parse_diff(diff_file: File) {
    //let differences: Vec<Difference>;

    let modified_file: File;
    //let total_modification: i32;
    
    // Split file up
    let diff_section = read_to_string("patch.diff").unwrap();
    //                                                         v Windows is bad and uses this for new lines
    let mut diff_split_section = diff_section.split("\r\n\r\n");

    let (insertions, deletions,  total_mods , flag) =
    get_modification_count(String::from(diff_split_section.nth(0).unwrap().split("\n").nth(1).unwrap()));

    for section in diff_split_section {
        for line in section.split("\r\n") {
            if line.chars().nth(0).unwrap() == '@' {
                match line.split(' ').nth(1).unwrap().chars().nth(0).unwrap() {
                    '+' => ,
                    '-' => ,
                    _ => return, 
                }
            }
        }
    }
}
// STEPS
// Recieve diff file
// Work out how many insertions and deletions
// Split into sections
// --   For each section
//      Consider whether addition or deletion
//      Create difference struct
//      Continue for all lines
// Return
STEPS
Recieve diff file
Work out how many insertions and deletions
Split into sections
For each section
Consider whether addition or deletion
Create difference struct
Continue for all lines
Return
STEPS Recieve diff file Work out how many insertions and deletions Split into sections For each section Consider whether addition or deletion Create difference struct Continue for all lines Return
fn parse_diff(diff_file: File) {
    //let differences: Vec<Difference>;
    let modified_file: File;
    //let total_modification: i32;
    // Split file up
    let diff_section = read_to_string("patch.diff").unwrap();
    //                                                         v Windows is bad and uses this for new lines
    let mut diff_split_section = diff_section.split("\r\n\r\n");
    let (insertions, deletions,  total_mods , flag) =
    get_modification_count(String::from(diff_split_section.nth(0).unwrap().split("\n").nth(1).unwrap()));
    for section in diff_split_section {
        for line in section.split("\r\n") {
            if line.chars().nth(0).unwrap() == '@' {
                match line.split(' ').nth(1).unwrap().chars().nth(0).unwrap() {
                    '+' => ,
                    '-' => ,
                    _ => return, 
                }
            }
        }
    }
}
fn parse_diff ( diff_file : File ) { //let differences: Vec<Difference>; let modified_file : File ; //let total_modification: i32; // Split file up let diff_section = read_to_string ( " " ) . unwrap ( ) ; //                                                         v Windows is bad and uses this for new lines let mut diff_split_section = diff_section . split ( " \r \n \r \n " ) ; let ( insertions , deletions , total_mods , flag ) = get_modification_count ( String :: from ( diff_split_section . nth ( 0 ) . unwrap ( ) . split ( " \n " ) . nth ( 1 ) . unwrap ( ) ) ) ; for section in diff_split_section { for line in section . split ( " \r \n " ) { if line . chars ( ) . nth ( 0 ) . unwrap ( ) == '@' { match line . split ( ' ' ) . nth ( 1 ) . unwrap ( ) . chars ( ) . nth ( 0 ) . unwrap ( ) { '+' => , '-' => , _ => return , } } } } }
STEPS
Recieve diff file
Work out how many insertions and deletions
Split into sections
   For each section
Consider whether addition or deletion
Create difference struct
Continue for all lines
Return
STEPS Recieve diff file Work out how many insertions and deletions Split into sections For each section Consider whether addition or deletion Create difference struct Continue for all lines Return
diff_file
File