Skip to content

Commit

Permalink
Escape &str in convert docs
Browse files Browse the repository at this point in the history
  • Loading branch information
czipperz committed Apr 13, 2019
1 parent 27ff536 commit 1e48da6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libcore/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub const fn identity<T>(x: T) -> T { x }
/// converted a the specified type `T`.
///
/// For example: By creating a generic function that takes an `AsRef<str>` we express that we
/// want to accept all references that can be converted to &str as an argument.
/// want to accept all references that can be converted to `&str` as an argument.
/// Since both [`String`] and `&str` implement `AsRef<str>` we can accept both as input argument.
///
/// [`String`]: ../../std/string/struct.String.html
Expand Down Expand Up @@ -312,7 +312,8 @@ pub trait Into<T>: Sized {
///
/// [`String`] implements `From<&str>`:
///
/// An explicit conversion from a &str to a String is done as follows:
/// An explicit conversion from a `&str` to a String is done as follows:
///
/// ```
/// let string = "hello".to_string();
/// let other_string = String::from("hello");
Expand Down

0 comments on commit 1e48da6

Please sign in to comment.