diff options
| author | bors <bors@rust-lang.org> | 2018-12-08 03:50:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-08 03:50:16 +0000 |
| commit | 059e6a6f57f4e80d527a3cd8a8afe7f51f01af8e (patch) | |
| tree | 90e0d7a855be8202279b6bdde6cbdc95d834f07a /src/libcore/ops | |
| parent | 0a7798079608b4ff014471ae64b6c8201aa59cdf (diff) | |
| parent | 003c5b796eae78c8c260bfddfc332a69926a6152 (diff) | |
| download | rust-059e6a6f57f4e80d527a3cd8a8afe7f51f01af8e.tar.gz rust-059e6a6f57f4e80d527a3cd8a8afe7f51f01af8e.zip | |
Auto merge of #56578 - alexreg:cosmetic-1, r=alexreg
Various minor/cosmetic improvements to code r? @Centril 😄
Diffstat (limited to 'src/libcore/ops')
| -rw-r--r-- | src/libcore/ops/function.rs | 6 | ||||
| -rw-r--r-- | src/libcore/ops/mod.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/ops/function.rs b/src/libcore/ops/function.rs index c9591c3f57b..d1be724c326 100644 --- a/src/libcore/ops/function.rs +++ b/src/libcore/ops/function.rs @@ -26,7 +26,7 @@ /// is expected. /// /// Use `Fn` as a bound when you want to accept a parameter of function-like -/// type and need to call it repeatedly and without mutating state (e.g. when +/// type and need to call it repeatedly and without mutating state (e.g., when /// calling it concurrently). If you do not need such strict requirements, use /// [`FnMut`] or [`FnOnce`] as bounds. /// @@ -84,7 +84,7 @@ pub trait Fn<Args> : FnMut<Args> { /// /// `FnMut` is implemented automatically by closures which take mutable /// references to captured variables, as well as all types that implement -/// [`Fn`], e.g. (safe) [function pointers][] (since `FnMut` is a supertrait of +/// [`Fn`], e.g., (safe) [function pointers][] (since `FnMut` is a supertrait of /// [`Fn`]). Additionally, for any type `F` that implements `FnMut`, `&mut F` /// implements `FnMut`, too. /// @@ -163,7 +163,7 @@ pub trait FnMut<Args> : FnOnce<Args> { /// implements `FnOnce`, it can only be called once. /// /// `FnOnce` is implemented automatically by closure that might consume captured -/// variables, as well as all types that implement [`FnMut`], e.g. (safe) +/// variables, as well as all types that implement [`FnMut`], e.g., (safe) /// [function pointers][] (since `FnOnce` is a supertrait of [`FnMut`]). /// /// Since both [`Fn`] and [`FnMut`] are subtraits of `FnOnce`, any instance of diff --git a/src/libcore/ops/mod.rs b/src/libcore/ops/mod.rs index edfa6df11ac..785f0733df2 100644 --- a/src/libcore/ops/mod.rs +++ b/src/libcore/ops/mod.rs @@ -27,7 +27,7 @@ //! should have some resemblance to multiplication (and share expected //! properties like associativity). //! -//! Note that the `&&` and `||` operators short-circuit, i.e. they only +//! Note that the `&&` and `||` operators short-circuit, i.e., they only //! evaluate their second operand if it contributes to the result. Since this //! behavior is not enforceable by traits, `&&` and `||` are not supported as //! overloadable operators. |
