Sabrina Jewson

Results 36 comments of Sabrina Jewson

My intention was to allow that (I even used it for the `NonZeroU8` implementation), I only wanted to make the error types unnameable so that the variants would be hidden...

Thanks — the following does compile: ```rs #[derive(bincode::Encode)] #[bincode(encode_bounds = "T: bincode::Encode + Clone")] struct Test where T: Clone, { a: T, } ``` I still think it would be...

Thank you for the response! My other question was whether it's possible for `MENU_NEXT` to be passed into `mode_result`. I just need to know whether I should be thinking about...

> I guess this is the goal? That binding is actually complete now, I ported over all the header files. Since it's so raw I didn't need to know the...

> I see how it is done, in mode.c line 93 it catches MENU_NEXT, MENU_PREV and MENU_QUICK_SWITCH before calling the Mode::mode_result . Oh thank you very much, I don't know...

By the way, I finished the library now: https://docs.rs/rofi-mode. I'm pretty pleased with it, it allows creating Rofi plugins from purely safe Rust :D

The following code is incorrect: ```rs join!( async { stream.yield_item(1).await; }, async { stream.yield_item(2).await; }, ); ``` because it will result in two items being yielded within the same poll,...

Oh wait, I was mistaken — `yield_item` already does take `&mut self`, meaning that the `join!` example woudn’t even compile. In that case there’s much less of a problem, the...

> I did something like `index = if len < 65536 { rng.u16(0..len) } else { rng.usize(0..len) }` and it did seem to help with the performance. This is probably...

Yes, I think that's all correct with the current implementation. It is two times faster to generate a `u32` and then split it than to generate two `u16`s. You don't...