pub fn from_edit_script<S: AsRef<str>>(edit_script: S) -> Result<Diff, Box<dyn Error>> {
        let mut remainder = edit_script.as_ref();
        let mut edits = Vec::new();

        while !remainder.is_empty() {
            let (r, e) = Edit::parse_edit_script(remainder)?;
            edits.push(e);
            remainder = r;
        }

        Ok(Diff { edits })
    }
/// Deserialize an edit script to create a diff
Deserialize an edit script to create a diff
Deserialize an edit script to create a diff
pub fn from_edit_script<S: AsRef<str>>(edit_script: S) -> Result<Diff, Box<dyn Error>> {
        let mut remainder = edit_script.as_ref();
        let mut edits = Vec::new();
        while !remainder.is_empty() {
            let (r, e) = Edit::parse_edit_script(remainder)?;
            edits.push(e);
            remainder = r;
        }
        Ok(Diff { edits })
    }
pub fn from_edit_script < S : AsRef < str > > ( edit_script : S ) -> Result < Diff , Box < dyn Error > > { let mut remainder = edit_script . as_ref ( ) ; let mut edits = Vec :: new ( ) ; while ! remainder . is_empty ( ) { let ( r , e ) = Edit :: parse_edit_script ( remainder ) ? ; edits . push ( e ) ; remainder = r ; } Ok ( Diff { edits } ) }
Deserialize an edit script to create a diff
Deserialize an edit script to create a diff
edit_script
S
edit_script
S