wgpu/wgpu-core
Jim Blandy ffd96a0a53 [core] Use a for loop in LifetimeTracker triage code.
A `for` loop is less noisy than a `drain`, which requires:

- a `mut` qualifier for a variable whose modified value we never
  consult

- a method name appearing mid-line instead of a control structure name
  at the front of the line

- a range which is always `..`, establishing no restriction at all

- a closure instead of a block

Structured control flow syntax has a fine pedigree, originating in,
among other places, Dijkstrsa's efforts at designing languages in a
way that made it easier to formally verify programs written in
them (see "A Discipline Of Programming"). There is nothing "more
mathematical" about a method call that takes a closure than a `for`
loop. Since `for_each` is useless unless the closure has side effects,
there's nothing "more functional" about `for_each` here, either.
Obsessive use of `for_each` suggests that the author loves Haskell
without understanding it.
2024-05-14 04:38:43 -04:00
..
src [core] Use a for loop in LifetimeTracker triage code. 2024-05-14 04:38:43 -04:00
build.rs Add cfg_aliases to wgpu-core and wgpu-hal (#5055) 2024-01-14 00:59:59 -05:00
Cargo.toml Remove unnecessary Cargo.toml dependencies via cargo machete (#5692) 2024-05-12 19:05:00 -04:00
LICENSE.APACHE Add symlink LICENSE files into crates. (#2604) 2022-05-29 03:07:42 -04:00
LICENSE.MIT Add symlink LICENSE files into crates. (#2604) 2022-05-29 03:07:42 -04:00