Diggory Hardy

Results 281 comments of Diggory Hardy

Suggestion: replace `insert_entry` with simpler `insert` as @Nokel81 suggested above: `pub fn insert(self, value: V) -> &'a mut V` This covers *most* uses (anything not needing to access the key),...

To add my own benchmarks (Ryzen 5800X, Linux 6.15.4-200.fc42.x86_64): ``` $ cargo bench --bench generators # 1kiB reads random_bytes/chacha20 time: [464.27 ns 465.36 ns 466.72 ns] thrpt: [2.0434 GiB/s 2.0493...

From [my comment](https://github.com/rust-windowing/winit/pull/3056#issuecomment-1695832606): > > An alternative of course could be to simply mark the enum #[non_exhausive] and add cfg-gated variants. > > `Event` should probably be `#[non_exhaustive]` anyway, just...

Note: this may provide an appropriate solution to my request in #3358 too.

Sounds good! I've been carefully going through `rustfmt`'s tweaks to the Rand codebase. Here are a few diffs I didn't like which may/may not be fixed by this option. Function...

> #![rustfmt::skip] I know; the above are provided more for motivation of where rustfmt could do better. > the granular max widths referenced above These may well prove sufficient. What's...

> `AltGr` is not a modifier, pretending that it's is not expected by anyone. I use `AltGr` as a modifier (custom layout) on Linux. `xev` reports this as `ISO_Level3_Shift`. Winit...

@eugenesvk are you referring to [this](https://devblogs.microsoft.com/oldnewthing/20040329-00/?p=40003)? It sounds to me like applications should not trigger a shortcut for e.g. `Alt+F4` if `Ctrl` is also pressed (which is exactly the behaviour...

> And you've now lost the ability to differentiate between a single key press AltGr = RAlt + LCtrl and two key presses LAlt+LCtrl. On Windows... but as you said...

> And since AltGr is Ctrl+Alt No, AltGr **is not** Ctrl+Alt. You've made this clear yourself: you want to add `ModifiersState::ALT_GRAPH`, and you consider LCtrl+LAlt different from LCtrl+RAlt. I have...