/// Copy an iterator of files to the given directory.
Copy an iterator of files to the given directory.
Copy an iterator of files to the given directory .
fn copy_files<I, S, N>(dest: &Path, sources: I) -> Result<()>
where
    I: IntoIterator<Item = (S, N)>,
    S: AsRef<Path>,
    N: AsRef<str>,
{
    for (s, name) in sources {
        let s = s.as_ref();
        let name = name.as_ref();
        fs::copy(s, dest.join(name))?;
    }
    Ok(())
}
fn copy_files < I , S , N > ( dest : & Path , sources : I ) -> Result < ( ) > where I : IntoIterator < Item = ( S , N ) > , S : AsRef < Path > , N : AsRef < str > , { for ( s , name ) in sources { let s = s . as_ref ( ) ; let name = name . as_ref ( ) ; fs :: copy ( s , dest . join ( name ) ) ? ; } Ok ( ( ) ) }
Copy an iterator of files to the given directory.
Copy an iterator of files to the given directory .
dest
&Path
sources
I