fn tag_target_path(tag: &Path, item: &Path) -> PathBuf {
    let mut t = tag.iter();
    let mut i = item.iter();

    let mut p = PathBuf::from("../");
    loop {
        let tnext = t.next();
        let inext = i.next();

        if tnext != inext {
            for _ in 0..t.count() {
                p.push("../");
            }
            p.push(inext.unwrap());
            for x in i {
                p.push(x);
            }
            break;
        }
    }

    p
}
/// Generate target path for a new symlink
///
/// `tag` and `item` are canonical paths.
Generate target path for a new symlink
`tag` and `item` are canonical paths.
Generate target path for a new symlink ` tag ` and ` item ` are canonical paths .
fn tag_target_path(tag: &Path, item: &Path) -> PathBuf {
    let mut t = tag.iter();
    let mut i = item.iter();
    let mut p = PathBuf::from("../");
    loop {
        let tnext = t.next();
        let inext = i.next();
        if tnext != inext {
            for _ in 0..t.count() {
                p.push("../");
            }
            p.push(inext.unwrap());
            for x in i {
                p.push(x);
            }
            break;
        }
    }
    p
}
fn tag_target_path ( tag : & Path , item : & Path ) -> PathBuf { let mut t = tag . iter ( ) ; let mut i = item . iter ( ) ; let mut p = PathBuf :: from ( " " ) ; loop { let tnext = t . next ( ) ; let inext = i . next ( ) ; if tnext != inext { for _ in 0 .. t . count ( ) { p . push ( " " ) ; } p . push ( inext . unwrap ( ) ) ; for x in i { p . push ( x ) ; } break ; } } p }
Generate target path for a new symlink
`tag` and `item` are canonical paths.
Generate target path for a new symlink ` tag ` and ` item ` are canonical paths .
tag
&Path
item
&Path