cargo-container 0.0.0

package rlibs in several containing frontends
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use mmrbi::env;

use std::ffi::OsString;
use std::path::Path;



pub fn prepend_paths<I: IntoIterator<Item = P>, P: AsRef<Path>>(paths: I) -> OsString {
    let mut o = OsString::new();
    for path in paths {
        o.push(path.as_ref());
        o.push(if cfg!(windows) { ";" } else { ":" });
    }
    o.push(env::req_var_os("PATH"));
    o
}