fix some typos
This commit is contained in:
@@ -536,7 +536,7 @@ use string;
|
||||
/// assert_eq!(s, "Hello, world!");
|
||||
/// ```
|
||||
///
|
||||
/// Please note that using [`format!`] might be preferrable.
|
||||
/// Please note that using [`format!`] might be preferable.
|
||||
/// Example:
|
||||
///
|
||||
/// ```
|
||||
|
||||
@@ -72,7 +72,7 @@ macro_rules! vec {
|
||||
|
||||
/// Creates a `String` using interpolation of runtime expressions.
|
||||
///
|
||||
/// The first argument `format!` recieves is a format string. This must be a string
|
||||
/// The first argument `format!` receives is a format string. This must be a string
|
||||
/// literal. The power of the formatting string is in the `{}`s contained.
|
||||
///
|
||||
/// Additional parameters passed to `format!` replace the `{}`s within the
|
||||
|
||||
@@ -346,7 +346,7 @@ impl<T> Rc<T> {
|
||||
unsafe {
|
||||
let val = ptr::read(&*this); // copy the contained object
|
||||
|
||||
// Indicate to Weaks that they can't be promoted by decrememting
|
||||
// Indicate to Weaks that they can't be promoted by decrementing
|
||||
// the strong count, and then remove the implicit "strong weak"
|
||||
// pointer while also handling drop logic by just crafting a
|
||||
// fake Weak.
|
||||
|
||||
@@ -596,7 +596,7 @@ impl String {
|
||||
/// Decode a UTF-16 encoded vector `v` into a `String`, returning [`Err`]
|
||||
/// if `v` contains any invalid data.
|
||||
///
|
||||
/// [`Err`]: ../../std/result/enum.Result.htlm#variant.Err
|
||||
/// [`Err`]: ../../std/result/enum.Result.html#variant.Err
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
@@ -1427,12 +1427,12 @@ mod pattern {
|
||||
Reject(6, 7),
|
||||
Match (7, 7),
|
||||
]);
|
||||
make_test!(str_searcher_mulibyte_haystack, " ", "├──", [
|
||||
make_test!(str_searcher_multibyte_haystack, " ", "├──", [
|
||||
Reject(0, 3),
|
||||
Reject(3, 6),
|
||||
Reject(6, 9),
|
||||
]);
|
||||
make_test!(str_searcher_empty_needle_mulibyte_haystack, "", "├──", [
|
||||
make_test!(str_searcher_empty_needle_multibyte_haystack, "", "├──", [
|
||||
Match (0, 0),
|
||||
Reject(0, 3),
|
||||
Match (3, 3),
|
||||
@@ -1455,7 +1455,7 @@ mod pattern {
|
||||
Match (5, 6),
|
||||
Reject(6, 7),
|
||||
]);
|
||||
make_test!(char_searcher_mulibyte_haystack, ' ', "├──", [
|
||||
make_test!(char_searcher_multibyte_haystack, ' ', "├──", [
|
||||
Reject(0, 3),
|
||||
Reject(3, 6),
|
||||
Reject(6, 9),
|
||||
|
||||
@@ -1089,7 +1089,7 @@ impl<T> Vec<T> {
|
||||
// Memory safety
|
||||
//
|
||||
// When the Drain is first created, it shortens the length of
|
||||
// the source vector to make sure no uninitalized or moved-from elements
|
||||
// the source vector to make sure no uninitialized or moved-from elements
|
||||
// are accessible at all if the Drain's destructor never gets to run.
|
||||
//
|
||||
// Drain will ptr::read out the values to remove.
|
||||
|
||||
Reference in New Issue
Block a user