pub fn is_version_only(diff: &str, vers: (&str, &str)) -> bool {
    let smalldiff = minify(diff);
    trace!("Checking diff for {:?}", vers);
    for l in smalldiff.lines() {
        // ignore headline for resource type (no actual changes)
        if !l.starts_with('+') && !l.starts_with('-') && l.contains("has changed:") {
            continue;
        }
        // ignore all lines that contain one of the versions
        if l.contains(vers.0) || l.contains(vers.1) {
            continue;
        }
        // any other lines found => not just a version change
        return false;
    }
    true
}
/// Check if a diff contains only version related changes
Check if a diff contains only version related changes
Check if a diff contains only version related changes
pub fn is_version_only(diff: &str, vers: (&str, &str)) -> bool {
    let smalldiff = minify(diff);
    trace!("Checking diff for {:?}", vers);
    for l in smalldiff.lines() {
        // ignore headline for resource type (no actual changes)
        if !l.starts_with('+') && !l.starts_with('-') && l.contains("has changed:") {
            continue;
        }
        // ignore all lines that contain one of the versions
        if l.contains(vers.0) || l.contains(vers.1) {
            continue;
        }
        // any other lines found => not just a version change
        return false;
    }
    true
}
pub fn is_version_only ( diff : & str , vers : ( & str , & str ) ) -> bool { let smalldiff = minify ( diff ) ; trace ! ( " " vers ) ; for l in smalldiff . lines ( ) { // ignore headline for resource type (no actual changes) if ! l . starts_with ( '+' ) && ! l . starts_with ( '-' ) && l . contains ( " " ) { continue ; } // ignore all lines that contain one of the versions if l . contains ( vers . 0 ) || l . contains ( vers . 1 ) { continue ; } // any other lines found => not just a version change return false ; } true }
Check if a diff contains only version related changes
Check if a diff contains only version related changes
diff
&str
vers
(&str, &str)
diff
&str
vers
(&str, &str)