mirror of
https://github.com/LinuxBeginnings/swww.git
synced 2026-01-12 07:21:01 -03:00
fix warnings and update MSRV to 1.82
This commit is contained in:
@@ -9,7 +9,7 @@ version = "0.9.5-masterV3"
|
||||
authors = ["Leonardo Gibrowski Faé <leonardo.fae44@gmail.com>"]
|
||||
edition = "2021"
|
||||
license-file = "LICENSE"
|
||||
rust-version = "1.80"
|
||||
rust-version = "1.82"
|
||||
|
||||
[workspace.dependencies]
|
||||
common = { path = "common" }
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
### Dependencies:
|
||||
|
||||
- Up to date stable rustc compiler and cargo (specifically, MSRV is 1.75.0)
|
||||
- Up to date stable rustc compiler and cargo (specifically, MSRV is 1.82.0)
|
||||
|
||||
To build, clone this repository and run:
|
||||
```
|
||||
|
||||
@@ -55,7 +55,8 @@ static INITIALIZED: AtomicBool = AtomicBool::new(false);
|
||||
#[must_use]
|
||||
pub fn wayland_fd() -> BorrowedFd<'static> {
|
||||
debug_assert!(INITIALIZED.load(std::sync::atomic::Ordering::Relaxed));
|
||||
unsafe { WAYLAND_FD.as_fd() }
|
||||
let ptr = &raw const WAYLAND_FD;
|
||||
unsafe { &*ptr }.as_fd()
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
@@ -67,20 +68,23 @@ pub fn fractional_scale_support() -> bool {
|
||||
/// Safe because this is a single threaded application, so no race conditions can occur
|
||||
pub fn object_type_get(object_id: ObjectId) -> Option<WlDynObj> {
|
||||
debug_assert!(INITIALIZED.load(std::sync::atomic::Ordering::Relaxed));
|
||||
unsafe { OBJECT_MANAGER.get(object_id) }
|
||||
let ptr = &raw const OBJECT_MANAGER;
|
||||
unsafe { &*ptr }.get(object_id)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
/// Safe because this is a single threaded application, so no race conditions can occur
|
||||
pub fn object_create(object_type: WlDynObj) -> ObjectId {
|
||||
debug_assert!(INITIALIZED.load(std::sync::atomic::Ordering::Relaxed));
|
||||
unsafe { OBJECT_MANAGER.create(object_type) }
|
||||
let ptr = &raw mut OBJECT_MANAGER;
|
||||
unsafe { &mut *ptr }.create(object_type)
|
||||
}
|
||||
|
||||
/// Safe because this is a single threaded application, so no race conditions can occur
|
||||
pub fn object_remove(object_id: ObjectId) {
|
||||
debug_assert!(INITIALIZED.load(std::sync::atomic::Ordering::Relaxed));
|
||||
unsafe { OBJECT_MANAGER.remove(object_id) }
|
||||
let ptr = &raw mut OBJECT_MANAGER;
|
||||
unsafe { &mut *ptr }.remove(object_id)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
||||
Reference in New Issue
Block a user