diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-02-26 18:00:41 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-03-18 00:40:59 +0300 |
| commit | b98255cbd2354c708e3557f26e9cd8f5aec1ed6b (patch) | |
| tree | cdc853206631d2a7d145fb57492e4f6d16a087bb /src/libstd | |
| parent | 1e9bef916f471e43fcd18593f95374ac42acf99e (diff) | |
| download | rust-b98255cbd2354c708e3557f26e9cd8f5aec1ed6b.tar.gz rust-b98255cbd2354c708e3557f26e9cd8f5aec1ed6b.zip | |
Add and fix more tests
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/old_path/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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]> { |
