Fixes a bunch of warnings like this:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> window/src/os/macos/window.rs:670:23
|
670 | fn display_handle(&self) -> Result<DisplayHandle, HandleError> {
| ^^^^^ ------------- the same lifetime is hidden here
| |
| the lifetime is elided here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
670 | fn display_handle(&self) -> Result<DisplayHandle<'_>, HandleError> {
| ++++
```
This lint was added in Rust 1.89: https://github.com/rust-lang/rust/issues/141787
There have been a couple of attempts at this in the past, which
had some usability warts in what I recall as an earlier, less
useful set of features overall.
Whether that was collective misunderstanding at the time, or things
have gotten better since then, now is a good time to adopt the workspace
dep syntax, because wezterm has many crates to keep on top of, and
automation like dependabot can't see a lot of them.
This will help to manage the versions of deps in wezterm centrally.
Let's try this out in CI: the Cargo.lock changes here are minimal
(eliminated a second version of base64 from one crate, terminal_size
from another, and removed an explicit dep on serde_derive) so
hopefully this sails through on !linux.
closes: https://github.com/wezterm/wezterm/pull/6668
Continuing from the previous commit, this shifts:
* In-memory data -> temporary file
* Image decoding -> background thread
The background thread asynchronously decodes frames and
sends them to the render thread via a bounded channel.
While decoding frames, it writes them, uncompressed, to
a scratch file so that when the animation loops, it is
a very cheap operation to rewind and pull that data
from the file, without having to burn CPU to re-decode
the data from the start.
Memory usage is bounded to 4 uncompressed frames while
decoding, then 3 uncompressed frames (triple buffered)
while looping over the rest.
However, disk usage is N uncompressed frames.
refs: https://github.com/wez/wezterm/issues/3263
Adding unix part of std redirect code. Also modifying existing changes based on feedback from the initial PR.
More changes based on feedback from PR.
Non linux unix OS's forced to use dup2 instead of dup3
Avoiding disposal issues with fd.
Small bit of refactoring plus some more ammendments based on more PR feedback.
Non linux compile issue fix.
Adding return
Another fix
Another fix
More amendments
fmt correction
closes: https://github.com/wez/wezterm/pull/816
closes: https://github.com/wez/wezterm/pull/788
closes: https://github.com/wez/wezterm/issues/786
Need to use the subsecond microsecond value, rather than the total
microsecond value, otherwise `select(2)` will yield EINVAL.
The wezterm changes show where this error was bubbling up
and breaking the tls client code.
This is a port of something I found when developing some changes
in watchman. When doing something like:
`some win32 command | wsl something`
That pipe doesn't look like a normal win32 pipe and we'd end up
treating it like a socket, but it isn't really a socket either.
This avoids a deadlock waiting for the named pipe information to be
returned if we're probing during drop(). This does make the
OwnedHandle struct slightly larger on windows.
I didn't notice that windows has separate traits for raw sockets,
so blanket impls for things that returned RawHandle's were not
applying on windows in the same way that they were on unix systems.