From 8330887e1b2272b14e334cb28fb85ccf0859f183 Mon Sep 17 00:00:00 2001 From: avborhanian Date: Wed, 7 Jun 2023 20:52:42 -0700 Subject: [PATCH] Updating documentation and lint formatting. --- clippy_lints/src/arc_with_non_send_sync.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/arc_with_non_send_sync.rs b/clippy_lints/src/arc_with_non_send_sync.rs index 2e14f81f8..ca2023ee0 100644 --- a/clippy_lints/src/arc_with_non_send_sync.rs +++ b/clippy_lints/src/arc_with_non_send_sync.rs @@ -17,10 +17,10 @@ declare_clippy_lint! { /// Wrapping a type in Arc doesn't add thread safety to the underlying data, so data races /// could occur when touching the underlying data. /// - /// ### Example. + /// ### Example /// ```rust - /// use std::cell::RefCell; - /// use std::sync::Arc; + /// # use std::cell::RefCell; + /// # use std::sync::Arc; /// /// fn main() { /// // This is safe, as `i32` implements `Send` and `Sync`. @@ -30,7 +30,6 @@ declare_clippy_lint! { /// let b = Arc::new(RefCell::new(42)); /// } /// ``` - /// ``` #[clippy::version = "1.72.0"] pub ARC_WITH_NON_SEND_SYNC, correctness, @@ -63,7 +62,7 @@ impl LateLintPass<'_> for ArcWithNonSendSync { "usage of `Arc` where `T` is not `Send` or `Sync`", None, "consider using `Rc` instead or wrapping `T` in a std::sync type like \ - Mutex", + `Mutex`", ); } }