mirror of
https://github.com/openharmony/third_party_rust_lazycell.git
synced 2026-07-01 21:04:09 -04:00
Merge pull request #60 from oconnor663/master
docs: fix missing backticks
This commit is contained in:
+2
-2
@@ -60,7 +60,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)` is the cell is already full.
|
||||
pub fn fill(&self, t: T) -> Result<(), T> {
|
||||
let mut slot = unsafe { &mut *self.inner.get() };
|
||||
if slot.is_some() {
|
||||
@@ -127,7 +127,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)` is 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);
|
||||
|
||||
Reference in New Issue
Block a user