pub fn parse_dep_info(pkg: &Package, dep_info: &Path) -> CargoResult<Option<Vec<PathBuf>>> {
    let data = match paths::read_bytes(dep_info) {
        Ok(data) => data,
        Err(_) => return Ok(None),
    };
    let paths = data
        .split(|&x| x == 0)
        .filter(|x| !x.is_empty())
        .map(|p| util::bytes2path(p).map(|p| pkg.root().join(p)))
        .collect::<Result<Vec<_>, _>>()?;
    if paths.is_empty() {
        Ok(None)
    } else {
        Ok(Some(paths))
    }
}
// Parse the dep-info into a list of paths
Parse the dep-info into a list of paths
Parse the dep - info into a list of paths
pub fn parse_dep_info(pkg: &Package, dep_info: &Path) -> CargoResult<Option<Vec<PathBuf>>> {
    let data = match paths::read_bytes(dep_info) {
        Ok(data) => data,
        Err(_) => return Ok(None),
    };
    let paths = data
        .split(|&x| x == 0)
        .filter(|x| !x.is_empty())
        .map(|p| util::bytes2path(p).map(|p| pkg.root().join(p)))
        .collect::<Result<Vec<_>, _>>()?;
    if paths.is_empty() {
        Ok(None)
    } else {
        Ok(Some(paths))
    }
}
pub fn parse_dep_info ( pkg : & Package , dep_info : & Path ) -> CargoResult < Option < Vec < PathBuf > > > { let data = match paths :: read_bytes ( dep_info ) { Ok ( data ) => data , Err ( _ ) => return Ok ( None ) , } ; let paths = data . split ( | & x | x == 0 ) . filter ( | x | ! x . is_empty ( ) ) . map ( | p | util :: bytes2path ( p ) . map ( | p | pkg . root ( ) . join ( p ) ) ) . collect :: < Result < Vec < _ > , _ > > ( ) ? ; if paths . is_empty ( ) { Ok ( None ) } else { Ok ( Some ( paths ) ) } }
Parse the dep-info into a list of paths
Parse the dep - info into a list of paths
pkg
&Package
dep_info
&Path
pkg
&Package
dep_info
&Path