Improvements to the policy store
Stacked patch on https://app.radicle.xyz/nodes/seed.radicle.xyz/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/patches/bd89ef967eb6b53784b8913280a7a4da27c25ac8
Base: 4de47ffff4277e42a211b8b7214161cafd830b84
radicle: return iterator types for db policies
Instead of collecting the results and returning the collection as an
iterator, introduce FollowPolicies and SeedPolicies types, which
implement Iterator.
Note that a call in service changed due to the lifetime borrow. It
simply collects into a Vec for the time being.
3 files changed
+74
-53
6940ac42
→
c847a16e
modified radicle-cli/src/commands/follow.rs
@@ -116,7 +116,7 @@ pub fn follow(
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle-node/src/service.rs
@@ -893,7 +893,7 @@ where
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -2476,7 +2476,10 @@ where
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/node/policy/store.rs
@@ -117,7 +117,7 @@ impl Store<Write> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -126,7 +126,7 @@ impl Store<Write> {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -295,52 +295,21 @@ impl<T> Store<T> {
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -355,6 +324,54 @@ impl<T> Store<T> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -410,10 +427,11 @@ mod test {
|
|
|
|
|
|
| + | |
|
|
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -463,7 +481,7 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -471,7 +489,7 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -532,11 +550,11 @@ mod test {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|