##// END OF EJS Templates
catapipe: add support for COUNTER events...
catapipe: add support for COUNTER events Differential Revision: https://phab.mercurial-scm.org/D6524

File last commit:

r42630:9609430d default
r42675:ff562d71 default
Show More
files.rs
17 lines | 371 B | application/rls-services+xml | RustLexer
use std::path::Path;
pub fn get_path_from_bytes(bytes: &[u8]) -> &Path {
let os_str;
#[cfg(unix)]
{
use std::os::unix::ffi::OsStrExt;
os_str = std::ffi::OsStr::from_bytes(bytes);
}
#[cfg(windows)]
{
use std::os::windows::ffi::OsStrExt;
os_str = std::ffi::OsString::from_wide(bytes);
}
Path::new(os_str)
}