Paweł Zmarzły
Paweł Zmarzły
In the worst case scenario, getting rid of `Box::pin` would require to rewrite all 97 `async {...}` blocks. It would decrease code readability for unnoticeable performance improvement. Unless some better...
Well, futures are now split between the compiler, std and futures-rs, so investigating it may take some effort. Before doing that, I'll try to search some more and try asking...
Okay, here's another theory of mine. In [this presentation](https://www.youtube.com/watch?v=skos4B5x7qE) (from ~14:20 to ~16:00), WithoutBoats stated the goal is to have "one heap allocation per future". After seeing [this commit](https://github.com/nearprotocol/nearcore/pull/976/files#diff-5aae9dc5316d68d492a5a37b85981b8fL121), I...
`pin_mut` [code](https://docs.rs/pin-utils/0.1.0-alpha.4/src/pin_utils/stack_pin.rs.html#12-23) looks so simple that I'd be surprised if that's the answer. Though, that would be a pleasant surprise. I tried it on [`pzmarzly/unsafe-pin`](https://github.com/pzmarzly/offst/commits/unsafe-pin), it compiles, but I haven't...
If we go this way, I'd prefer to use `pin_mut` macro over RFC example implementation. I find it more elegant and error-prone: ```rust let f = async { ... };...
The Async Book has [chapter on pinning](https://rust-lang.github.io/async-book/04_pinning/01_chapter.html), which gives `pin_mut!` a green light. But I guess I should finally ask someone more experienced about it (and even then, check if...
Here is some raw perf data, though I stopped writing these down after a while exclude-path=/usr/lib, include-pattern=components: 502 722 540 131 cycles:u # 2,628 GHz 938 866 219 880 instructions:u...
Have you tried not using `Result` in there? It's signature is `Result` (type, error).
I can see 2 solutions: - to mimic shell behavior using `onCommandChange(command, terminal)` callback - see whether there are newline characters in command, if so, split the command and utilize...
Maybe [indeterminate checkboxes](https://css-tricks.com/indeterminate-checkboxes/) could be used? They display as `[-]` in modern browsers (not sure about Safari though).