Skip to content

Commit 48e4ccd

Browse files
Bump rust requirement to 1.81, utilize lint_expect
1 parent 6d1a2df commit 48e4ccd

File tree

10 files changed

+10
-12
lines changed

10 files changed

+10
-12
lines changed

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- uses: hecrj/setup-rust-action@v1
1919
with:
20-
rust-version: 1.70.0
20+
rust-version: 1.81.0
2121
- uses: actions/checkout@v2
2222
- name: Install deps
2323
run: |

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "zlib-acknowledgement"
99
keywords = ["sfml", "multimedia", "game"]
1010
readme = "README.md"
1111
edition = "2021"
12-
rust-version = "1.70"
12+
rust-version = "1.81"
1313

1414
[features]
1515
default = ["graphics", "audio"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Requirements
77
=============
88

99
- Linux, Windows, or OS X
10-
- Rust 1.70 or later
10+
- Rust 1.81 or later
1111
- [SFML 2.6](http://www.sfml-dev.org/download.php)
1212
- A C++ compiler for building CSFML
1313

src/ffi/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ pub(crate) struct SensorEvent {
238238

239239
#[repr(C)]
240240
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
241-
#[allow(dead_code)] // constructed on C++ side by SFML
241+
#[expect(dead_code, reason = "constructed on C++ side by SFML")]
242242
pub(crate) enum EventType {
243243
Closed,
244244
Resized,

src/graphics/color.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ impl From<u32> for Color {
9797
/// Construct the color from 32-bit unsigned integer.
9898
///
9999
/// The number should contain the components in RGBA order.
100-
#[allow(clippy::cast_possible_truncation)]
101100
fn from(src: u32) -> Self {
102101
Self {
103102
r: ((src & 0xff000000) >> 24) as u8,
@@ -160,7 +159,7 @@ impl Mul for Color {
160159
/// Calculate the component-wise modulated multiplication of two colors.
161160
///
162161
/// For each `X` in `rgba`, `result.X = a.X * b.X / 255`.
163-
#[allow(clippy::cast_possible_truncation)]
162+
#[expect(clippy::cast_possible_truncation)]
164163
fn mul(self, other: Color) -> Color {
165164
let (r1, r2) = (self.r as u16, other.r as u16);
166165
let (g1, g2) = (self.g as u16, other.g as u16);

src/graphics/convex_shape.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub struct ConvexShape<'s> {
2424

2525
/// An iterator over the points of a [`ConvexShape`].
2626
#[derive(Debug)]
27-
#[allow(missing_copy_implementations)]
2827
pub struct ConvexShapePoints {
2928
convex_shape: *mut ffi::sfConvexShape,
3029
pos: usize,

src/graphics/transform.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Transform {
2424
/// - *a20* : Element (2, 0) of the matrix
2525
/// - *a21* : Element (2, 1) of the matrix
2626
/// - *a22* : Element (2, 2) of the matrix
27-
#[allow(clippy::too_many_arguments)]
27+
#[expect(clippy::too_many_arguments)]
2828
#[must_use]
2929
pub fn new(
3030
a00: f32,

src/system/input_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use {
88
},
99
};
1010

11-
#[allow(clippy::comparison_chain)]
11+
#[expect(clippy::comparison_chain)]
1212
unsafe extern "C" fn read<T: Read + Seek>(
1313
data: *mut c_void,
1414
size: c_longlong,

src/system/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl Ord for Time {
6464
impl Time {
6565
/// Constructs a time value from a number of seconds.
6666
#[must_use]
67-
#[allow(clippy::cast_possible_truncation)]
67+
#[expect(clippy::cast_possible_truncation)]
6868
pub fn seconds(seconds: f32) -> Self {
6969
Time((seconds * 1000000.) as i64)
7070
}
@@ -89,7 +89,7 @@ impl Time {
8989

9090
/// Returns the time value as a number of milliseconds.
9191
#[must_use]
92-
#[allow(clippy::cast_possible_truncation)]
92+
#[expect(clippy::cast_possible_truncation)]
9393
pub fn as_milliseconds(self) -> i32 {
9494
(self.0 / 1000) as i32
9595
}

src/window/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ mod style;
2727
pub(crate) mod thread_safety;
2828
pub mod touch;
2929
mod video_mode;
30-
#[allow(clippy::module_inception)]
30+
#[expect(clippy::module_inception)]
3131
mod window;

0 commit comments

Comments
 (0)