msrv: Bumb to 1.85
This commit is contained in:
parent
d743e1a317
commit
b252c0fa64
7 changed files with 12 additions and 11 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
- name: Checkout sources
|
||||
uses: actions/checkout@v3
|
||||
- name: Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@1.80.1
|
||||
uses: dtolnay/rust-toolchain@1.85.1
|
||||
- name: Get date for registry cache
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ readme = "README.md"
|
|||
homepage = "https://smithay.github.io/"
|
||||
keywords = ["wayland", "compositor", "graphics", "server"]
|
||||
categories = ["gui"]
|
||||
rust-version = "1.80.1"
|
||||
rust-version = "1.85"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["test_all_features", "libseat/docs_rs"]
|
||||
|
|
|
|||
|
|
@ -794,9 +794,10 @@ impl AnvilState<UdevData> {
|
|||
with_pointer_constraint(&surface, &pointer, |constraint| match constraint {
|
||||
Some(constraint) if constraint.is_active() => {
|
||||
// Constraint does not apply if not within region
|
||||
if !constraint.region().map_or(true, |x| {
|
||||
x.contains((pointer_location - *surface_loc).to_i32_round())
|
||||
}) {
|
||||
if !constraint
|
||||
.region()
|
||||
.is_none_or(|x| x.contains((pointer_location - *surface_loc).to_i32_round()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
match &*constraint {
|
||||
|
|
@ -872,7 +873,7 @@ impl AnvilState<UdevData> {
|
|||
with_pointer_constraint(&under, &pointer, |constraint| match constraint {
|
||||
Some(constraint) if !constraint.is_active() => {
|
||||
let point = (pointer_location - surface_location).to_i32_round();
|
||||
if constraint.region().map_or(true, |region| region.contains(point)) {
|
||||
if constraint.region().is_none_or(|region| region.contains(point)) {
|
||||
constraint.activate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -653,7 +653,7 @@ impl<BackendData: Backend + 'static> AnvilState<BackendData> {
|
|||
SecurityContextState::new::<Self, _>(&dh, |client| {
|
||||
client
|
||||
.get_data::<ClientState>()
|
||||
.map_or(true, |client_state| client_state.security_context.is_none())
|
||||
.is_none_or(|client_state| client_state.security_context.is_none())
|
||||
});
|
||||
|
||||
// init input
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
msrv = "1.80.1"
|
||||
msrv = "1.85"
|
||||
type-complexity-threshold = 400
|
||||
|
||||
disallowed-macros = [
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ impl<U: Clone + Send + Sync + 'static> SeatData<U> {
|
|||
for device in self
|
||||
.known_devices
|
||||
.iter()
|
||||
.filter(|&device| restrict_to.is_none() || restrict_to == Some(device))
|
||||
.filter(|&device| restrict_to.is_none_or(|r| r == device))
|
||||
.filter(|&device| match device {
|
||||
// NOTE: filter by actual type here to not get a missmpatches when using selections
|
||||
// later on.
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ impl XSettings {
|
|||
data.push(0u8);
|
||||
data.extend(&(name.len() as u16).to_ne_bytes());
|
||||
data.extend(name);
|
||||
data.extend(std::iter::repeat(0u8).take(pad(name.len())));
|
||||
data.extend(std::iter::repeat_n(0u8, pad(name.len())));
|
||||
data.extend(&setting.last_changed_serial.to_ne_bytes());
|
||||
|
||||
setting.val.serialize(&mut data);
|
||||
|
|
@ -228,7 +228,7 @@ impl Value {
|
|||
let val = val.as_bytes();
|
||||
data.extend(&(val.len() as u32).to_ne_bytes());
|
||||
data.extend(val);
|
||||
data.extend(std::iter::repeat(0u8).take(pad(val.len())));
|
||||
data.extend(std::iter::repeat_n(0u8, pad(val.len())));
|
||||
}
|
||||
Value::Color(val) => {
|
||||
for component in val {
|
||||
|
|
|
|||
Loading…
Reference in a new issue