##// END OF EJS Templates
rust-cross-platform: remove `unimplemented!` to get compile-time errors...
Raphaël Gomès -
r43525:60ee5842 default draft
parent child Browse files
Show More
@@ -21,12 +21,9 b' pub fn get_path_from_bytes(bytes: &[u8])'
21 21 use std::os::unix::ffi::OsStrExt;
22 22 os_str = std::ffi::OsStr::from_bytes(bytes);
23 23 }
24 #[cfg(windows)]
25 {
26 // TODO: convert from Windows MBCS (ANSI encoding) to WTF8.
27 // Perhaps, the return type would have to be Result<PathBuf>.
28 unimplemented!()
29 }
24 // TODO Handle other platforms
25 // TODO: convert from WTF8 to Windows MBCS (ANSI encoding).
26 // Perhaps, the return type would have to be Result<PathBuf>.
30 27
31 28 Path::new(os_str)
32 29 }
@@ -258,11 +258,8 b' pub fn hg_path_to_os_string<P: AsRef<HgP'
258 258 use std::os::unix::ffi::OsStrExt;
259 259 os_str = std::ffi::OsStr::from_bytes(&hg_path.as_ref().as_bytes());
260 260 }
261 #[cfg(windows)]
262 {
263 // TODO: convert from Windows MBCS (ANSI encoding) to WTF8.
264 unimplemented!();
265 }
261 // TODO Handle other platforms
262 // TODO: convert from WTF8 to Windows MBCS (ANSI encoding).
266 263 Ok(os_str.to_os_string())
267 264 }
268 265
@@ -281,11 +278,9 b' pub fn os_string_to_hg_path_buf<S: AsRef'
281 278 use std::os::unix::ffi::OsStrExt;
282 279 buf = HgPathBuf::from_bytes(&os_string.as_ref().as_bytes());
283 280 }
284 #[cfg(windows)]
285 {
286 // TODO: convert from WTF8 to Windows MBCS (ANSI encoding).
287 unimplemented!();
288 }
281 // TODO Handle other platforms
282 // TODO: convert from WTF8 to Windows MBCS (ANSI encoding).
283
289 284 buf.check_state()?;
290 285 Ok(buf)
291 286 }
@@ -300,11 +295,9 b' pub fn path_to_hg_path_buf<P: AsRef<Path'
300 295 use std::os::unix::ffi::OsStrExt;
301 296 buf = HgPathBuf::from_bytes(&os_str.as_bytes());
302 297 }
303 #[cfg(windows)]
304 {
305 // TODO: convert from WTF8 to Windows MBCS (ANSI encoding).
306 unimplemented!();
307 }
298 // TODO Handle other platforms
299 // TODO: convert from WTF8 to Windows MBCS (ANSI encoding).
300
308 301 buf.check_state()?;
309 302 Ok(buf)
310 303 }
General Comments 0
You need to be logged in to leave comments. Login now