radicle-heartwood-lfs/crates
Matthias Beyer b49ff9e5af radicle: Implement Iterator::size_hint() for optimizations
This patch adds an implementation of the Iterator::size_hint() trait
function so that the compiler can optimize allocations on the collecting
side of the iterator better.

From the trait function docs:

> size_hint() is primarily intended to be used for optimizations such
> as reserving space for the elements of the iterator, but must not be
> trusted to e.g., omit bounds checks in unsafe code. An incorrect
> implementation of size_hint() should not lead to memory safety
> violations.

Source: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.size_hint

And:

> Vec may use any or none of the following strategies, depending on the
> supplied iterator:
>
>  *  preallocate based on Iterator::size_hint() and panic if the number
>     of items is outside the provided lower/upper bounds

Source: https://doc.rust-lang.org/stable/std/iter/trait.FromIterator.html

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2025-08-17 20:22:56 +02:00
..
radicle radicle: Implement Iterator::size_hint() for optimizations 2025-08-17 20:22:56 +02:00
radicle-cli refactor: Replace return Err(anyhow!()) with anyhow::bail!() 2025-08-17 20:17:11 +02:00
radicle-cli-test fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-cob fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-crypto fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-dag repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00
radicle-fetch fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-node node: Remove useless caching of node announcement 2025-08-13 10:27:00 +01:00
radicle-protocol fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-remote-helper term, cli, remote-helper: Status Symbols 2025-08-13 13:45:21 +01:00
radicle-schemars fix: upgrade radicle-crypto 2025-08-13 09:20:42 +01:00
radicle-signals repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00
radicle-ssh release: prepare crates 2025-08-12 12:13:49 +02:00
radicle-systemd release: prepare crates 2025-08-12 12:13:49 +02:00
radicle-term refactor: Replace return Err(anyhow!()) with anyhow::bail!() 2025-08-17 20:17:11 +02:00