Skip to content

Commit dca2005

Browse files
committed
Add note about a good default mutability
1 parent 70e70e3 commit dca2005

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/objc2/src/mutability.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
//! (can be done inside [`extern_class!`] and [`declare_class!`]).
1616
//!
1717
//! Note that precious little of Objective-C follows Rust's usual shared xor
18-
//! unique ownership model, most often objects assume interior mutability.
18+
//! unique ownership model, most often objects assume interior mutability, so
19+
//! a safe default is often [`InteriorMutable`], or of you're working with GUI
20+
//! code, [`MainThreadOnly`].
1921
//!
2022
//! [`UnsafeCell`]: core::cell::UnsafeCell
2123
//! [`ClassType::Mutability`]: crate::ClassType::Mutability

0 commit comments

Comments
 (0)