Skip to content

Commit

Permalink
Expose EcoVec::is_unique (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Jul 31, 2023
1 parent 8b65f81 commit 9aa2b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ impl<T> EcoVec<T> {
/// uncontrolled cloning is happening in the time between the `is_unique`
/// call and any subsequent mutation.
#[inline]
fn is_unique(&mut self) -> bool {
pub fn is_unique(&mut self) -> bool {
// See Arc's is_unique() method.
self.header().map_or(true, |header| header.refs.load(Acquire) == 1)
}
Expand Down

0 comments on commit 9aa2b9e

Please sign in to comment.