Building of term::Table from iterator
This patchset introduces a FromIterator for term::Table implementation and makes use of that to collect iterators into term::Table instances.
This reduces cognitive load on the (API-)consuming side as well as it might
be more resource efficient as preallocation of internal Vecs can happen. I
did not measure of course, but still.
8 files changed
+89
-46
ff021d58
→
370ae364
modified Cargo.lock
@@ -1862,6 +1862,15 @@ dependencies = [
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -2714,6 +2723,7 @@ dependencies = [
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified Cargo.toml
@@ -30,6 +30,7 @@ dunce = "1.0.5"
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-cli/Cargo.toml
@@ -19,6 +19,7 @@ chrono = { workspace = true, features = ["clock", "std"] }
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/inbox.rs
@@ -264,10 +264,6 @@ fn list_repo<'a, R: ReadStorage>(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
|
|
|
|
|
@@ -281,8 +277,11 @@ where
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -305,26 +304,33 @@ where
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
| + | |
|
|
|
|
|
@@ -333,8 +339,12 @@ where
|
|
|
|
|
|
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/patch/list.rs
@@ -14,6 +14,8 @@ use term::Element as _;
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
@@ -79,13 +81,14 @@ pub fn run(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-cli/src/commands/remote/list.rs
@@ -81,10 +81,9 @@ pub fn untracked<'a>(
|
|
|
|
|
|
| - | |
| - | |
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
@@ -95,25 +94,24 @@ pub fn print_tracked<'a>(tracked: impl Iterator<Item = &'a Tracked>) {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
|
modified crates/radicle-cli/src/terminal/patch.rs
@@ -306,18 +306,20 @@ pub fn get_update_message(
|
|
|
|
|
|
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified crates/radicle-term/src/table.rs
@@ -78,6 +78,19 @@ impl<const W: usize, T> Default for Table<W, T> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -169,6 +182,11 @@ impl<const W: usize, T: Cell> Table<W, T> {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|