Skip to content

Commit

Permalink
Add #[allow(clippy::arc_with_non_send_sync)]
Browse files Browse the repository at this point in the history
warning: usage of an `Arc` that is not `Send` and `Sync`
  --> src/lib.rs:66:20
   |
66 |             inner: Arc::new(inner),
   |                    ^^^^^^^^^^^^^^^
   |
   = note: `Arc<InnerStarReference>` is not `Send` and `Sync` as `InnerStarReference` is not `Send`
   = help: if the `Arc` will not used be across threads replace it with an `Rc`
   = help: otherwise make `InnerStarReference` `Send` and `Sync` or consider a wrapper type such as `Mutex`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
   = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
  • Loading branch information
sjackman committed Jul 11, 2024
1 parent e4d83b0 commit 73019dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ struct InnerStarReference {
header_view: HeaderView,
}

//xxx unsafe impl Send for InnerStarReference {}
unsafe impl Sync for InnerStarReference {}

impl Drop for InnerStarReference {
Expand Down Expand Up @@ -62,6 +63,7 @@ impl StarReference {
settings,
};

#[allow(clippy::arc_with_non_send_sync)]
Ok(StarReference {
inner: Arc::new(inner),
})
Expand Down

0 comments on commit 73019dc

Please sign in to comment.