Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
crumblingstatue committed Dec 2, 2024
1 parent 5855d49 commit 1d55add
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/audio/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ unsafe impl Send for SoundBufferRecorder {}
// `&SoundBufferRecorder` between threads.
unsafe impl Sync for SoundBufferRecorder {}


impl SoundBufferRecorder {
/// Create a new sound buffer recorder
///
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/fbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ impl<T: ?Sized> std::fmt::Debug for FBox<T> {

// SAFETY: An `FBox` owns its contents, so it is safe to move between threads if and only if the
// contents is safe to move between threads. This matches the behaviour of `std::boxed::Box`.
unsafe impl <T: Send> Send for FBox<T> {}
unsafe impl<T: Send> Send for FBox<T> {}

// SAFETY: An `FBox` derefs to its contents, so it is safe to pass an `&FBox<T>` between threads if
// and only if it is safe to pass a reference to its contents between threads. This matches the
// behaviour of `std::boxed::Box`.
unsafe impl <T: Sync> Sync for FBox<T> {}
unsafe impl<T: Sync> Sync for FBox<T> {}

impl<T: ?Sized> FBox<T> {
pub(crate) fn new(ptr: *mut T) -> Option<Self> {
Expand Down

0 comments on commit 1d55add

Please sign in to comment.