-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the caches mutating a deque node through a ptr derived
from a shared ref - Add `Deque::peek_front_ptr` method that returns a `NonNull` pointer (instead of a shared reference) to the front node. - Remove `DeqNode::next` method. - Add `DeqNode::next_ptr` _function_ that returns a `NonNull` pointers to the next node. - Add `Deque::move_front_to_back` method that moves the front node to the back of the deque, instead of moving the node through a shared reference to the node.
- Loading branch information
1 parent
03c75ff
commit 57e13c7
Showing
4 changed files
with
61 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,3 +194,5 @@ impl<K> Deques<K> { | |
} | ||
} | ||
} | ||
|
||
// TODO: Add tests and run Miri with them. |
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
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