fix: prevent copy tests from failing in Rust 1.90
Issue where changed: https://github.com/rust-lang/rust/issues/139956 Comment noting breakage of non-socket converted to UnixStream: 'https://github.com/rust-lang/rust/pull/140005#issuecomment-2853932531' Bumps MSRV from 1.83.0 to 1.87.0 by use of PipeWriter
This commit is contained in:
parent
af33f7eb12
commit
8b74001a13
2 changed files with 4 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ rustix = "0.38.31"
|
||||||
all = "deny"
|
all = "deny"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
rust-version = "1.83.0"
|
rust-version = "1.87.0"
|
||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "xwayland-satellite"
|
name = "xwayland-satellite"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
use std::collections::{hash_map, HashMap, HashSet};
|
use std::collections::{hash_map, HashMap, HashSet};
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use std::io::Write;
|
use std::io::{PipeWriter, Write};
|
||||||
use std::os::fd::{AsFd, BorrowedFd, OwnedFd};
|
use std::os::fd::{AsFd, BorrowedFd, OwnedFd};
|
||||||
use std::os::unix::net::UnixStream;
|
use std::os::unix::net::UnixStream;
|
||||||
use std::sync::{Arc, Mutex, OnceLock};
|
use std::sync::{Arc, Mutex, OnceLock};
|
||||||
|
|
@ -1134,7 +1134,7 @@ impl Dispatch<ZwpPrimarySelectionOfferV1, Vec<PasteData>> for State {
|
||||||
.position(|data| data.mime_type == mime_type)
|
.position(|data| data.mime_type == mime_type)
|
||||||
.unwrap_or_else(|| panic!("Invalid mime type: {mime_type}"));
|
.unwrap_or_else(|| panic!("Invalid mime type: {mime_type}"));
|
||||||
|
|
||||||
let mut stream = UnixStream::from(fd);
|
let mut stream = PipeWriter::from(fd);
|
||||||
stream.write_all(&data[pos].data).unwrap();
|
stream.write_all(&data[pos].data).unwrap();
|
||||||
}
|
}
|
||||||
Request::Destroy => {}
|
Request::Destroy => {}
|
||||||
|
|
@ -1219,7 +1219,7 @@ impl Dispatch<WlDataOffer, Vec<PasteData>> for State {
|
||||||
.position(|data| data.mime_type == mime_type)
|
.position(|data| data.mime_type == mime_type)
|
||||||
.unwrap_or_else(|| panic!("Invalid mime type: {mime_type}"));
|
.unwrap_or_else(|| panic!("Invalid mime type: {mime_type}"));
|
||||||
|
|
||||||
let mut stream = UnixStream::from(fd);
|
let mut stream = PipeWriter::from(fd);
|
||||||
stream.write_all(&data[pos].data).unwrap();
|
stream.write_all(&data[pos].data).unwrap();
|
||||||
}
|
}
|
||||||
wl_data_offer::Request::Destroy => {}
|
wl_data_offer::Request::Destroy => {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue