Typo: insure => ensure
Noticed several instances of the same typo. In most other places it's correctly 'ensure', just not here.
see https://github.com/ziglang/zig/pull/19181#issuecomment-1998000935
Oops, reverted the wrong half of the commit. Will fix!
Have squashed. The commit now only fixes typos in non-vendored code.
Just some food for thought; this isn't necessarily a typo.
the third definition of
and the first definition of
shows they are synonyms.
Am aware of that, but it is essentially a typo, as they're not really synonyms. Insure is nearly always used for the financial/insurance meaning, whereas ensure is more correct in these cases. Even if you want to make the argument that you can use "insure" for the "to make sure" meaning, it's very non-standard, and moreover is inconsistent with our choices everywhere else. Even excluding lib/libc*, there are ~1.5k instances of "ensure" across 200+ files, and these are the only exceptions. Particularly, there are several functions/methods that include it (e.g. ensureTotalCapacity, ensureUnusedCapacity, ...), and basically I think that - as with code style - it's better to be consistent.
lib/include is also vendored.
@Vexu I've committed a revert of the lib/include files, but there's still the main typo, which is in lib/init/build.zig.zon. Can you reopen?