Skip to content

Commit a274468

Browse files
committed
Fix other clippy errors
1 parent fea5a21 commit a274468

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

gdnative-core/src/export/method.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ type ScriptMethodFn = unsafe extern "C" fn(
9696
*mut *mut sys::godot_variant,
9797
) -> sys::godot_variant;
9898

99-
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
99+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Default)]
100100
#[non_exhaustive]
101101
pub enum RpcMode {
102+
#[default]
102103
Disabled,
103104
Remote,
104105
RemoteSync,
@@ -108,13 +109,6 @@ pub enum RpcMode {
108109
PuppetSync,
109110
}
110111

111-
impl Default for RpcMode {
112-
#[inline]
113-
fn default() -> Self {
114-
RpcMode::Disabled
115-
}
116-
}
117-
118112
impl RpcMode {
119113
pub(crate) fn sys(self) -> sys::godot_method_rpc_mode {
120114
match self {

gdnative-core/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@
2727
)]
2828
#![cfg_attr(
2929
any(test, feature = "gd-test"),
30-
allow(clippy::excessive_precision, clippy::disallowed_names)
30+
allow(
31+
clippy::excessive_precision,
32+
clippy::disallowed_names,
33+
clippy::redundant_clone
34+
)
3135
)]
3236

3337
#[doc(hidden)]

0 commit comments

Comments
 (0)