[yew-devel] applied: [PATCH proxmox-yew-widget-toolkit 1/1] store: implement FromIterator

Thomas Lamprecht t.lamprecht at proxmox.com
Sat Jan 25 17:57:34 CET 2025


Am 22.01.25 um 16:49 schrieb Stefan Hanreich:
> Enables better ergonomics for building stores from iterators and
> is generally considered nice to have for structs representing some
> form of collection.
> 
> For example:
> 
> ```
> self.store = Store::new();
> 
> store.set_data(
>    it.collect()
> );
> ```
> 
> vs
> 
> ```
> self.store = it.collect()
> ```
> 
> or
> 
> ```
> Store::from_iter(it)
> ```
> 
> Signed-off-by: Stefan Hanreich <s.hanreich at proxmox.com>
> ---
>  src/state/store.rs | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
>

applied, thanks!




More information about the yew-devel mailing list