Various minor/cosmetic improvements to code

This commit is contained in:
Alexander Regueiro
2018-11-27 02:59:49 +00:00
parent 4a45578bc5
commit ee89c088b0
457 changed files with 2384 additions and 2360 deletions

View File

@@ -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