@@ -135,12 +135,12 @@ use sys::path::{is_sep_byte, is_verbatim_sep, MAIN_SEP_STR, parse_prefix};
135
135
/// get_path_prefix(r"\\?\pictures\kittens"));
136
136
/// assert_eq!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")),
137
137
/// get_path_prefix(r"\\?\UNC\server\share"));
138
- /// assert_eq!(VerbatimDisk('C' as u8 ), get_path_prefix(r"\\?\c:\"));
138
+ /// assert_eq!(VerbatimDisk(b 'C'), get_path_prefix(r"\\?\c:\"));
139
139
/// assert_eq!(DeviceNS(OsStr::new("BrainInterface")),
140
140
/// get_path_prefix(r"\\.\BrainInterface"));
141
141
/// assert_eq!(UNC(OsStr::new("server"), OsStr::new("share")),
142
142
/// get_path_prefix(r"\\server\share"));
143
- /// assert_eq!(Disk('C' as u8 ), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris"));
143
+ /// assert_eq!(Disk(b 'C'), get_path_prefix(r"C:\Users\Rust\Pictures\Ferris"));
144
144
/// # }
145
145
/// ```
146
146
#[ derive( Copy , Clone , Debug , Hash , PartialOrd , Ord , PartialEq , Eq ) ]
@@ -235,10 +235,10 @@ impl<'a> Prefix<'a> {
235
235
///
236
236
/// assert!(Verbatim(OsStr::new("pictures")).is_verbatim());
237
237
/// assert!(VerbatimUNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
238
- /// assert!(VerbatimDisk('C' as u8 ).is_verbatim());
238
+ /// assert!(VerbatimDisk(b 'C').is_verbatim());
239
239
/// assert!(!DeviceNS(OsStr::new("BrainInterface")).is_verbatim());
240
240
/// assert!(!UNC(OsStr::new("server"), OsStr::new("share")).is_verbatim());
241
- /// assert!(!Disk('C' as u8 ).is_verbatim());
241
+ /// assert!(!Disk(b 'C').is_verbatim());
242
242
/// ```
243
243
#[ inline]
244
244
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -401,7 +401,7 @@ enum State {
401
401
/// let path = Path::new(r"c:\you\later\");
402
402
/// match path.components().next().unwrap() {
403
403
/// Component::Prefix(prefix_component) => {
404
- /// assert_eq!(Prefix::Disk('C' as u8 ), prefix_component.kind());
404
+ /// assert_eq!(Prefix::Disk(b 'C'), prefix_component.kind());
405
405
/// assert_eq!(OsStr::new("c:"), prefix_component.as_os_str());
406
406
/// }
407
407
/// _ => unreachable!(),
@@ -1040,7 +1040,7 @@ impl<'a> cmp::Ord for Components<'a> {
1040
1040
/// [`Deref`]: ../ops/trait.Deref.html
1041
1041
///
1042
1042
/// More details about the overall approach can be found in
1043
- /// the module documentation.
1043
+ /// the [ module documentation](index.html) .
1044
1044
///
1045
1045
/// # Examples
1046
1046
///
@@ -1186,7 +1186,7 @@ impl PathBuf {
1186
1186
self . inner . push ( path) ;
1187
1187
}
1188
1188
1189
- /// Truncate `self` to [`self.parent`].
1189
+ /// Truncates `self` to [`self.parent`].
1190
1190
///
1191
1191
/// Returns `false` and does nothing if [`self.file_name`] is [`None`].
1192
1192
/// Otherwise, returns `true`.
@@ -1512,7 +1512,7 @@ impl AsRef<OsStr> for PathBuf {
1512
1512
/// [`PathBuf`]: struct.PathBuf.html
1513
1513
///
1514
1514
/// More details about the overall approach can be found in
1515
- /// the module documentation.
1515
+ /// the [ module documentation](index.html) .
1516
1516
///
1517
1517
/// # Examples
1518
1518
///
@@ -1689,7 +1689,7 @@ impl Path {
1689
1689
self . has_root ( ) && ( cfg ! ( unix) || cfg ! ( target_os = "redox" ) || self . prefix ( ) . is_some ( ) )
1690
1690
}
1691
1691
1692
- /// Return `false ` if the `Path` is relative, i.e. not absolute.
1692
+ /// Returns `true ` if the `Path` is relative, i.e. not absolute.
1693
1693
///
1694
1694
/// See [`is_absolute`]'s documentation for more details.
1695
1695
///
@@ -2019,7 +2019,7 @@ impl Path {
2019
2019
/// * Repeated separators are ignored, so `a/b` and `a//b` both have
2020
2020
/// `a` and `b` as components.
2021
2021
///
2022
- /// * Occurentces of `.` are normalized away, exept if they are at the
2022
+ /// * Occurences of `.` are normalized away, except if they are at the
2023
2023
/// beginning of the path. For example, `a/./b`, `a/b/`, `a/b/.` and
2024
2024
/// `a/b` all have `a` and `b` as components, but `./a/b` starts with
2025
2025
/// an additional [`CurDir`] component.
0 commit comments