Re: [PATCH v10 4/5] rust: drm: gem: Introduce shmem::SGTable

lyude
2026-04-17T19:45:58Z

...realized the moment I sent this I meant to say labeled block
expressions, but also I realized I won't need those either anyhow :).

On Fri, 2026-04-17 at 15:44 -0400, lyude@redhat.com wrote:
> Just so it doesn't come as a surprise in the next respin - I don't
> really see a reasonable way of using get_or_insert_with() here
> (though
> I had no idea this was a thing!). However - I can get rid of all of
> the
> ret = statements and also clean up the indenting a little bit with
> block expressions as I forgot those exist.
>
> On Fri, 2026-04-10 at 16:55 +0900, Alexandre Courbot wrote:
> >
> > nit: let's use `let ret = if let Some(sgt_res) ...` to avoid the
> > multiple `ret = `statements?
> >
> > Or maybe even better, you might be able to use
> > `Option::get_or_insert_with`.