-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix minor SharedPtr/SharedRef issues, and add unit tests
* The `Default` trait did not actually get derived for `SharedPtr<T>`. This is solved by implementing `Default` manually. * Trait function `Shared::get()` used to return a mutable raw pointer (`*mut Self`), but it would be inconceivable to ever mutate the referenced value. It was changed to return a const pointer instead. * Added some basic unit tests for types `SharedPtr` and `SharedRef`.
- Loading branch information
1 parent
1009103
commit 252b58a
Showing
2 changed files
with
85 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters