]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/once.rs
Various minor/cosmetic improvements to code
[rust.git] / src / libstd / sync / once.rs
index 98845e457b25c8a25dd1ee5b9554cafbfa5269a8..13e0d2edb8375735536a0504688327eb217923c5 100644 (file)
@@ -189,7 +189,7 @@ pub const fn new() -> Once {
     /// static INIT: Once = Once::new();
     ///
     /// // Accessing a `static mut` is unsafe much of the time, but if we do so
-    /// // in a synchronized fashion (e.g. write once or read all) then we're
+    /// // in a synchronized fashion (e.g., write once or read all) then we're
     /// // good to go!
     /// //
     /// // This function will only call `expensive_computation` once, and will
@@ -232,7 +232,7 @@ pub fn call_once<F>(&self, f: F) where F: FnOnce() {
 
     /// Performs the same function as [`call_once`] except ignores poisoning.
     ///
-    /// Unlike [`call_once`], if this `Once` has been poisoned (i.e. a previous
+    /// Unlike [`call_once`], if this `Once` has been poisoned (i.e., a previous
     /// call to `call_once` or `call_once_force` caused a panic), calling
     /// `call_once_force` will still invoke the closure `f` and will _not_
     /// result in an immediate panic. If `f` panics, the `Once` will remain
@@ -290,8 +290,8 @@ pub fn call_once_force<F>(&self, f: F) where F: FnOnce(&OnceState) {
     }
 
     /// Returns true if some `call_once` call has completed
-    /// successfuly. Specifically, `is_completed` will return false in
-    /// the following situtations:
+    /// successfully. Specifically, `is_completed` will return false in
+    /// the following situations:
     ///   * `call_once` was not called at all,
     ///   * `call_once` was called, but has not yet completed,
     ///   * the `Once` instance is poisoned