Skip to content

Commit f0bf78b

Browse files
committed
Apply cargo fmt
1 parent 7548e4c commit f0bf78b

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

client/src/camera/controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn camera_control_system(
1515
>,
1616
player_query: Query<&Transform, With<Player>>,
1717
mut player: Query<&mut Player>,
18-
ui_mode: Res<UIMode>
18+
ui_mode: Res<UIMode>,
1919
) {
2020
let window = windows.single();
2121

client/src/input/mouse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn mouse_grab_system(mut windows: Query<&mut Window, With<PrimaryWindow>>) {
1111

1212
pub fn set_mouse_visibility(
1313
mut windows: Query<&mut Window, With<PrimaryWindow>>,
14-
ui_mode: Res<UIMode>
14+
ui_mode: Res<UIMode>,
1515
) {
1616
let mut window = windows.single_mut();
1717
window.cursor.visible = *ui_mode == UIMode::Opened;

client/src/player/interactions.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,11 @@ pub fn handle_block_interactions(
103103
{
104104
// Try to get item currently selected in player hotbar
105105
if let Some(item) = player.inventory.get(&hotbar.single().selected) {
106-
107-
inventory::remove_item_from_stack(&mut player_query.single_mut(), hotbar.single().selected, 1);
106+
inventory::remove_item_from_stack(
107+
&mut player_query.single_mut(),
108+
hotbar.single().selected,
109+
1,
110+
);
108111

109112
// Check if the item has a block counterpart
110113
if let Some(block) = items::block_from_item(item.id) {

client/src/player/inventory.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ pub fn add_item_to_stack(
118118
/// Removes items from stack at specified position\
119119
/// Stacks cannot have < 0 number of items\
120120
/// Returns number of items really removed from the stack
121-
pub fn remove_item_from_stack(
122-
player: &mut Player,
123-
stack: u32,
124-
mut nb: u32,
125-
) -> u32 {
121+
pub fn remove_item_from_stack(player: &mut Player, stack: u32, mut nb: u32) -> u32 {
126122
let item_option = player.inventory.get(&stack);
127123

128124
if let Some(&item) = item_option {

0 commit comments

Comments
 (0)