Skip to content

Commit

Permalink
ci: Fix dead code error on nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda committed Jan 14, 2024
1 parent c2b8704 commit 733bf31
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/platform_impl/linux/x11/ime/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/platform_impl/linux/x11/ime/input_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/linux/x11/ime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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 {
Expand Down
2 changes: 1 addition & 1 deletion src/platform_impl/windows/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,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() };
Expand Down

0 comments on commit 733bf31

Please sign in to comment.