Skip to content

Commit 2af5d71

Browse files
michaelsproulorium
authored andcommitted
Use triomphe::Arc by default.
1 parent d3faad5 commit 2af5d71

File tree

11 files changed

+18
-16
lines changed

11 files changed

+18
-16
lines changed

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ include = [
3939
codecov = { repository = "orium/rpds", branch = "main", service = "github" }
4040

4141
[dependencies]
42-
archery = "1.0.0"
42+
# FIXME(sproul): update after release
43+
# archery = "1.0.0"
44+
archery = { git = "https://github.com/orium/archery.git", rev = "bf910da0c5069e6f72fd34c2c16da51a2c0af91b", features = ["triomphe"] }
4345
serde = { version = "1.0.149", optional = true, default-features = false }
4446

4547
[dev-dependencies]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ crate to do this in a convenient way.
317317
The pointer type can be parameterized like this:
318318

319319
```rust
320-
let vec: Vector<u32, archery::ArcK> = Vector::new_with_ptr_kind();
320+
let vec: Vector<u32, archery::ArcTK> = Vector::new_with_ptr_kind();
321321
//
322322
// This will use `Arc` pointers.
323323
// Change it to `archery::RcK` to use a `Rc` pointer.

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
//! ```rust
337337
//! # use rpds::Vector;
338338
//! #
339-
//! let vec: Vector<u32, archery::ArcK> = Vector::new_with_ptr_kind();
339+
//! let vec: Vector<u32, archery::ArcTK> = Vector::new_with_ptr_kind();
340340
//! // ↖
341341
//! // This will use `Arc` pointers.
342342
//! // Change it to `archery::RcK` to use a `Rc` pointer.

src/list/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ macro_rules! list {
7979
#[macro_export]
8080
macro_rules! list_sync {
8181
($($e:expr),*) => {
82-
$crate::list_reverse!(::archery::ArcK ; $($e),* ; )
82+
$crate::list_reverse!(::archery::ArcTK ; $($e),* ; )
8383
};
8484
}
8585

@@ -137,7 +137,7 @@ where
137137
}
138138
}
139139

140-
pub type ListSync<T> = List<T, ArcK>;
140+
pub type ListSync<T> = List<T, ArcTK>;
141141

142142
impl<T> ListSync<T> {
143143
#[must_use]

src/map/hash_trie_map/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::list;
1010
use crate::utils::DefaultBuildHasher;
1111
use crate::List;
1212
use alloc::vec::Vec;
13-
use archery::{ArcK, RcK, SharedPointer, SharedPointerKind};
13+
use archery::{ArcTK, RcK, SharedPointer, SharedPointerKind};
1414
use core::borrow::Borrow;
1515
use core::fmt::Display;
1616
use core::hash::BuildHasher;
@@ -126,7 +126,7 @@ where
126126
hasher_builder: H,
127127
}
128128

129-
pub type HashTrieMapSync<K, V, H = DefaultBuildHasher> = HashTrieMap<K, V, ArcK, H>;
129+
pub type HashTrieMapSync<K, V, H = DefaultBuildHasher> = HashTrieMap<K, V, ArcTK, H>;
130130

131131
/// This map works like a trie that breaks the hash of the key in segments, and the segments are
132132
/// used as the index in the trie branches.

src/map/red_black_tree_map/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
use super::entry::Entry;
7-
use archery::{ArcK, RcK, SharedPointer, SharedPointerKind};
7+
use archery::{ArcTK, RcK, SharedPointer, SharedPointerKind};
88
use core::borrow::Borrow;
99
use core::cmp::Ordering;
1010
use core::fmt::Display;
@@ -113,7 +113,7 @@ where
113113
size: usize,
114114
}
115115

116-
pub type RedBlackTreeMapSync<K, V> = RedBlackTreeMap<K, V, ArcK>;
116+
pub type RedBlackTreeMapSync<K, V> = RedBlackTreeMap<K, V, ArcTK>;
117117

118118
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
119119
enum Color {

src/queue/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ where
107107
out_list: List<T, P>,
108108
}
109109

110-
pub type QueueSync<T> = Queue<T, ArcK>;
110+
pub type QueueSync<T> = Queue<T, ArcTK>;
111111

112112
impl<T> QueueSync<T> {
113113
#[must_use]

src/set/hash_trie_set/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use crate::map::hash_trie_map;
77
use crate::utils::DefaultBuildHasher;
88
use crate::HashTrieMap;
9-
use archery::{ArcK, RcK, SharedPointerKind};
9+
use archery::{ArcTK, RcK, SharedPointerKind};
1010
use core::borrow::Borrow;
1111
use core::fmt::Display;
1212
use core::hash::BuildHasher;
@@ -104,7 +104,7 @@ where
104104
map: HashTrieMap<T, (), P, H>,
105105
}
106106

107-
pub type HashTrieSetSync<T, H = DefaultBuildHasher> = HashTrieSet<T, ArcK, H>;
107+
pub type HashTrieSetSync<T, H = DefaultBuildHasher> = HashTrieSet<T, ArcTK, H>;
108108

109109
impl<T> HashTrieSet<T, RcK, DefaultBuildHasher>
110110
where

src/set/red_black_tree_set/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
use crate::map::red_black_tree_map;
77
use crate::RedBlackTreeMap;
8-
use archery::{ArcK, RcK, SharedPointerKind};
8+
use archery::{ArcTK, RcK, SharedPointerKind};
99
use core::borrow::Borrow;
1010
use core::cmp::Ordering;
1111
use core::fmt::Display;
@@ -104,7 +104,7 @@ where
104104
map: RedBlackTreeMap<T, (), P>,
105105
}
106106

107-
pub type RedBlackTreeSetSync<T> = RedBlackTreeSet<T, ArcK>;
107+
pub type RedBlackTreeSetSync<T> = RedBlackTreeSet<T, ArcTK>;
108108

109109
impl<T> RedBlackTreeSetSync<T>
110110
where

src/stack/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ where
100100
list: List<T, P>,
101101
}
102102

103-
pub type StackSync<T> = Stack<T, ArcK>;
103+
pub type StackSync<T> = Stack<T, ArcTK>;
104104

105105
impl<T> StackSync<T> {
106106
#[must_use]

0 commit comments

Comments
 (0)