Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
Replace `is` typo with `if`.
  • Loading branch information
DirkyJerky authored and Nikita Pekin committed Mar 24, 2019
1 parent db9289a commit 5f5ba9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl<T> LazyCell<T> {

/// Put a value into this cell.
///
/// This function will return `Err(value)` is the cell is already full.
/// This function will return `Err(value)` if the cell is already full.
pub fn fill(&self, value: T) -> Result<(), T> {
let slot = unsafe { &mut *self.inner.get() };
if slot.is_some() {
Expand Down Expand Up @@ -252,7 +252,7 @@ impl<T> AtomicLazyCell<T> {

/// Put a value into this cell.
///
/// This function will return `Err(value)` is the cell is already full.
/// This function will return `Err(value)` if the cell is already full.
pub fn fill(&self, t: T) -> Result<(), T> {
if NONE != self.state.compare_and_swap(NONE, LOCK, Ordering::Acquire) {
return Err(t);
Expand Down

0 comments on commit 5f5ba9d

Please sign in to comment.