Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of Rust 1.63 features #863

Merged
merged 2 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions x11rb/build.rs

This file was deleted.

6 changes: 1 addition & 5 deletions x11rb/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ impl std::fmt::Display for LibxcbLoadError {
LibxcbLoadError::GetSymbolError(symbol, e) => write!(
f,
"failed to get symbol \"{}\": {}",
symbol
.iter()
.flat_map(|&c| std::ascii::escape_default(c))
.map(char::from)
.collect::<String>(),
symbol.escape_ascii(),
e,
),
}
Expand Down
8 changes: 4 additions & 4 deletions x11rb/src/xcb_ffi/atomic_u64.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! Either `AtomicU64` or emulating `AtomicU64` through a `Mutex`.

// Use the `AtomicU64` from the standard library if we're on a platform that supports atomic
// 64-bit operations. If we can't tell, just fall back to the `Mutex` implementation anyways.
#[cfg(all(not(x11rb_no_target_has_atomic), target_has_atomic = "64"))]
// 64-bit operations.
#[cfg(target_has_atomic = "64")]
pub(crate) use std::sync::atomic::AtomicU64;

#[cfg(any(x11rb_no_target_has_atomic, not(target_has_atomic = "64")))]
#[cfg(not(target_has_atomic = "64"))]
mod impl_ {
use std::sync::atomic::Ordering;
use std::sync::Mutex;
Expand All @@ -31,5 +31,5 @@ mod impl_ {
}
}

#[cfg(any(x11rb_no_target_has_atomic, not(target_has_atomic = "64")))]
#[cfg(not(target_has_atomic = "64"))]
pub(crate) use self::impl_::AtomicU64;