Skip to content

Commit 12ebaa4

Browse files
committed
make clippy happy
1 parent 9e2184d commit 12ebaa4

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

net-pong/rust/src/lobby.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use godot::classes::object::ConnectFlags;
1111
use godot::global::Error;
1212
use godot::prelude::*;
1313

14-
const SCORE_TO_WIN: i32 = 10;
1514
const DEFAULT_PORT: i32 = 8910;
1615

1716
#[derive(GodotClass)]
@@ -110,9 +109,8 @@ impl IPanel for Lobby {
110109
.signals()
111110
.connected_to_server()
112111
.builder()
113-
.connect_other_mut(&self.to_gd(), |this: &mut Self| {
112+
.connect_other_mut(&self.to_gd(), |_this: &mut Self| {
114113
// This function is not needed for this project.
115-
()
116114
});
117115
multiplayer
118116
.signals()

net-pong/rust/src/paddle.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ impl IArea2D for Paddle {
6161
// as possible, even if one of the calls is dropped.
6262
let args = vslice![self.base().get_position(), self._motion];
6363
self.base_mut().rpc("set_pos_and_motion", args);
64-
} else {
65-
if !self._you_hidden {
66-
self.you_label.as_mut().unwrap().hide();
67-
}
64+
} else if !self._you_hidden {
65+
self.you_label.as_mut().unwrap().hide();
6866
}
6967

7068
let translation = Vector2::new(0.0, self._motion * delta as f32);

0 commit comments

Comments
 (0)