Benjamin Saunders

Results 1100 comments of Benjamin Saunders

I'm not opposed to having something like a `trait DispatchableHandle: Handle { fn from_raw(x: *mut u8); }`, in that case. On the one hand it's a small amount of additional...

I'd merge this, but both it and master fail on my (NixOS) machine with: ``` thread 'main' panicked at /home/ralith/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/x11-dl-2.19.1/src/xlib.rs:25:1: null pointer dereference occurred ``` so I'd better wait for...

A handwritten special case here would be useful. Otherwise, you can avoid error-prone unsafety by using bytemuck or similar.

We'll definitely need the special case to avoid having to manually set `valueCount` correctly, though.

Alternatively, a `trait LayerSettingValue { fn as_bytes(&self) -> &[u8]; fn len(&self) -> usize; }` could make this DWIM nicely.

For now, let's just replace the `VALUES.len()` call with its literal, and leave a TODO citing the RA bug. Compilation will still fail if the value changes and we forget...

In that case, my recommendation would be to add a commit (or follow-up PR) that replaces `len()` calls with TODO-bearing literals as needed, which we can then easily revert once...

The required checks should be in the repository settings, which you should have access to. Disabling that would be a fine expediency, IMO.

I've dropped the check requirements for now, though it will likely take a push to refresh things.