Skip to content

Commit 8330887

Browse files
committed
Updating documentation and lint formatting.
1 parent 339cd14 commit 8330887

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

clippy_lints/src/arc_with_non_send_sync.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ declare_clippy_lint! {
1717
/// Wrapping a type in Arc doesn't add thread safety to the underlying data, so data races
1818
/// could occur when touching the underlying data.
1919
///
20-
/// ### Example.
20+
/// ### Example
2121
/// ```rust
22-
/// use std::cell::RefCell;
23-
/// use std::sync::Arc;
22+
/// # use std::cell::RefCell;
23+
/// # use std::sync::Arc;
2424
///
2525
/// fn main() {
2626
/// // This is safe, as `i32` implements `Send` and `Sync`.
@@ -30,7 +30,6 @@ declare_clippy_lint! {
3030
/// let b = Arc::new(RefCell::new(42));
3131
/// }
3232
/// ```
33-
/// ```
3433
#[clippy::version = "1.72.0"]
3534
pub ARC_WITH_NON_SEND_SYNC,
3635
correctness,
@@ -63,7 +62,7 @@ impl LateLintPass<'_> for ArcWithNonSendSync {
6362
"usage of `Arc<T>` where `T` is not `Send` or `Sync`",
6463
None,
6564
"consider using `Rc<T>` instead or wrapping `T` in a std::sync type like \
66-
Mutex<T>",
65+
`Mutex<T>`",
6766
);
6867
}
6968
}

0 commit comments

Comments
 (0)