Re: [TECH TOPIC] Rust for Linux

Steven Rostedt
2021-07-19T18:47:59Z

On Mon, 19 Jul 2021 20:24:51 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:

> On Mon, Jul 19, 2021 at 4:43 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> >
> > Turns out "a..b" in Rust does mean "range from a to b-1".
> > That's gonna be hard to (un)learn...
>
> It may help to think about it as the usual `for` loop in C, typically
> written with `<` and the "size" (instead of `<=` and the "size - 1"),
> i.e.:
>
> for i in 0..N
> for (i = 0; i < N; ++i)
>

Or think of it as the python range() function, but not as a git log, where

git log sha1..sha2

is a list of commits from sha1 + 1 through to sha2 inclusive :-p

-- Steve