mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
ci: Fix dead code error on nightly
See https://github.com/rust-lang/rust/pull/118297
This commit is contained in:
@@ -79,9 +79,9 @@ pub(crate) unsafe fn set_destroy_callback(
|
||||
#[allow(clippy::enum_variant_names)]
|
||||
enum ReplaceImError {
|
||||
// Boxed to prevent large error type
|
||||
MethodOpenFailed(Box<PotentialInputMethods>),
|
||||
ContextCreationFailed(ImeContextCreationError),
|
||||
SetDestroyCallbackFailed(XError),
|
||||
MethodOpenFailed(#[allow(dead_code)] Box<PotentialInputMethods>),
|
||||
ContextCreationFailed(#[allow(dead_code)] ImeContextCreationError),
|
||||
SetDestroyCallbackFailed(#[allow(dead_code)] XError),
|
||||
}
|
||||
|
||||
// Attempt to replace current IM (which may or may not be presently valid) with a new one. This
|
||||
|
||||
@@ -159,9 +159,9 @@ impl InputMethodResult {
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
enum GetXimServersError {
|
||||
XError(XError),
|
||||
GetPropertyError(util::GetPropertyError),
|
||||
InvalidUtf8(IntoStringError),
|
||||
XError(#[allow(dead_code)] XError),
|
||||
GetPropertyError(#[allow(dead_code)] util::GetPropertyError),
|
||||
InvalidUtf8(#[allow(dead_code)] IntoStringError),
|
||||
}
|
||||
|
||||
impl From<util::GetPropertyError> for GetXimServersError {
|
||||
|
||||
@@ -52,7 +52,7 @@ pub enum ImeRequest {
|
||||
pub(crate) enum ImeCreationError {
|
||||
// Boxed to prevent large error type
|
||||
OpenFailure(Box<PotentialInputMethods>),
|
||||
SetDestroyCallbackFailed(XError),
|
||||
SetDestroyCallbackFailed(#[allow(dead_code)] XError),
|
||||
}
|
||||
|
||||
pub(crate) struct Ime {
|
||||
|
||||
@@ -87,7 +87,7 @@ unsafe impl<T> Sync for MainThreadSafe<T> {}
|
||||
|
||||
static DROP_HANDLER: OnceLock<AsyncSender<DropBox>> = OnceLock::new();
|
||||
|
||||
struct DropBox(Box<dyn Any>);
|
||||
struct DropBox(#[allow(dead_code)] Box<dyn Any>);
|
||||
|
||||
unsafe impl Send for DropBox {}
|
||||
unsafe impl Sync for DropBox {}
|
||||
|
||||
@@ -1398,7 +1398,7 @@ unsafe fn register_window_class<T: 'static>(class_name: &[u16]) {
|
||||
unsafe { RegisterClassExW(&class) };
|
||||
}
|
||||
|
||||
struct ComInitialized(*mut ());
|
||||
struct ComInitialized(#[allow(dead_code)] *mut ());
|
||||
impl Drop for ComInitialized {
|
||||
fn drop(&mut self) {
|
||||
unsafe { CoUninitialize() };
|
||||
|
||||
Reference in New Issue
Block a user