From b98255cbd2354c708e3557f26e9cd8f5aec1ed6b Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 26 Feb 2015 18:00:41 +0300 Subject: Add and fix more tests --- src/libstd/old_path/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/old_path/mod.rs b/src/libstd/old_path/mod.rs index cb7ee36183d..83d17e4fc47 100644 --- a/src/libstd/old_path/mod.rs +++ b/src/libstd/old_path/mod.rs @@ -311,7 +311,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # #[cfg(windows)] fn foo() {} /// # #[cfg(unix)] fn foo() { /// let p = Path::new("abc/def/ghi"); - /// assert_eq!(p.filename(), Some(b"ghi")); + /// assert_eq!(p.filename(), Some(&b"ghi"[..])); /// # } /// ``` fn filename<'a>(&'a self) -> Option<&'a [u8]>; @@ -345,7 +345,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # #[cfg(windows)] fn foo() {} /// # #[cfg(unix)] fn foo() { /// let p = Path::new("/abc/def.txt"); - /// assert_eq!(p.filestem(), Some(b"def")); + /// assert_eq!(p.filestem(), Some(&b"def"[..])); /// # } /// ``` fn filestem<'a>(&'a self) -> Option<&'a [u8]> { @@ -392,7 +392,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// # #[cfg(windows)] fn foo() {} /// # #[cfg(unix)] fn foo() { /// let p = Path::new("abc/def.txt"); - /// assert_eq!(p.extension(), Some(b"txt")); + /// assert_eq!(p.extension(), Some(&b"txt"[..])); /// # } /// ``` fn extension<'a>(&'a self) -> Option<&'a [u8]> { -- cgit 1.4.1-3-g733a5