@@ -247,7 +247,9 @@ impl OsString {
247
247
self . inner . shrink_to_fit ( )
248
248
}
249
249
250
- /// Converts this `OsString` into a boxed `OsStr`.
250
+ /// Converts this `OsString` into a boxed [`OsStr`].
251
+ ///
252
+ /// [`OsStr`]: struct.OsStr.html
251
253
///
252
254
/// # Examples
253
255
///
@@ -482,12 +484,13 @@ impl OsStr {
482
484
/// Returns the length of this `OsStr`.
483
485
///
484
486
/// Note that this does **not** return the number of bytes in this string
485
- /// as, for example, OS strings on Windows are encoded as a list of `u16`
487
+ /// as, for example, OS strings on Windows are encoded as a list of [ `u16`]
486
488
/// rather than a list of bytes. This number is simply useful for passing to
487
489
/// other methods like [`OsString::with_capacity`] to avoid reallocations.
488
490
///
489
491
/// See `OsStr` introduction for more information about encoding.
490
492
///
493
+ /// [`u16`]: ../primitive.u16.html
491
494
/// [`OsString::with_capacity`]: struct.OsString.html#method.with_capacity
492
495
///
493
496
/// # Examples
@@ -506,7 +509,10 @@ impl OsStr {
506
509
self . inner . inner . len ( )
507
510
}
508
511
509
- /// Converts a `Box<OsStr>` into an `OsString` without copying or allocating.
512
+ /// Converts a [`Box`]`<OsStr>` into an [`OsString`] without copying or allocating.
513
+ ///
514
+ /// [`Box`]: ../boxed/struct.Box.html
515
+ /// [`OsString`]: struct.OsString.html
510
516
#[ unstable( feature = "into_boxed_os_str" , issue = "40380" ) ]
511
517
pub fn into_os_string ( self : Box < OsStr > ) -> OsString {
512
518
let inner: Box < Slice > = unsafe { mem:: transmute ( self ) } ;
0 commit comments