Skip to content

Commit 050c82d

Browse files
committed
rust: arc: add .unwrap() to doctests
This is part of the effort to minimize the differences of the `rust` branch with respect to mainline in order to eventually drop it. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent d63c230 commit 050c82d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rust/kernel/sync/arc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ impl<T: ?Sized> Deref for ArcBorrow<'_, T> {
518518
/// Ok(x.into())
519519
/// }
520520
///
521-
/// # test();
521+
/// # test().unwrap();
522522
/// ```
523523
///
524524
/// In the following example we first allocate memory for a ref-counted `Example` but we don't
@@ -539,7 +539,7 @@ impl<T: ?Sized> Deref for ArcBorrow<'_, T> {
539539
/// Ok(x.write(Example { a: 10, b: 20 }).into())
540540
/// }
541541
///
542-
/// # test();
542+
/// # test().unwrap();
543543
/// ```
544544
///
545545
/// In the last example below, the caller gets a pinned instance of `Example` while converting to
@@ -561,7 +561,7 @@ impl<T: ?Sized> Deref for ArcBorrow<'_, T> {
561561
/// Ok(pinned.into())
562562
/// }
563563
///
564-
/// # test();
564+
/// # test().unwrap();
565565
/// ```
566566
pub struct UniqueArc<T: ?Sized> {
567567
inner: Arc<T>,

0 commit comments

Comments
 (0)