Skip to content

Commit

Permalink
Fix code in docs to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lupus committed Oct 14, 2024
1 parent 5aa1357 commit 266e844
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ will create a `Mutex`-protected version (exclusive).
You can create a `DynBox` with either a `Mutex` or `RwLock`:
```rust
let exclusive_box = DynBox::new_exclusive(value); // Mutex-protected
let shared_box = DynBox::new_shared(value); // RwLock-protected
use ocaml_rs_smartptr::ptr::DynBox;
let exclusive_box = DynBox::new_exclusive(42); // Mutex-protected
let shared_box = DynBox::new_shared("foo"); // RwLock-protected
```
### Coercion
Expand Down

0 comments on commit 266e844

Please sign in to comment.