cargo fmt

This commit is contained in:
Imbris 2024-01-04 00:30:21 -05:00
parent 6d57169875
commit 807bd758b7
12 changed files with 20 additions and 36 deletions

View File

@ -410,7 +410,10 @@ impl Client {
// Initialize `State` // Initialize `State`
let pools = State::pools(GameMode::Client); let pools = State::pools(GameMode::Client);
let mut state = State::client(pools, map_size_lg, world_map.default_chunk, let mut state = State::client(
pools,
map_size_lg,
world_map.default_chunk,
// TODO: Add frontend systems // TODO: Add frontend systems
|dispatch_builder| { |dispatch_builder| {
add_local_systems(dispatch_builder); add_local_systems(dispatch_builder);
@ -1803,11 +1806,7 @@ impl Client {
/// Execute a single client tick, handle input and update the game state by /// Execute a single client tick, handle input and update the game state by
/// the given duration. /// the given duration.
pub fn tick( pub fn tick(&mut self, inputs: ControllerInputs, dt: Duration) -> Result<Vec<Event>, Error> {
&mut self,
inputs: ControllerInputs,
dt: Duration,
) -> Result<Vec<Event>, Error> {
span!(_guard, "tick", "Client::tick"); span!(_guard, "tick", "Client::tick");
// This tick function is the centre of the Veloren universe. Most client-side // This tick function is the centre of the Veloren universe. Most client-side
// things are managed from here, and as such it's important that it // things are managed from here, and as such it's important that it

View File

@ -11,9 +11,7 @@ use common::{
uid::{IdMaps, Uid}, uid::{IdMaps, Uid},
}; };
use common_ecs::{Job, Origin, Phase, System}; use common_ecs::{Job, Origin, Phase, System};
use specs::{ use specs::{shred, Entities, Entity as EcsEntity, Join, Read, ReadStorage, SystemData};
shred, Entities, Entity as EcsEntity, Join, Read, ReadStorage, SystemData,
};
#[derive(SystemData)] #[derive(SystemData)]
pub struct ReadData<'a> { pub struct ReadData<'a> {

View File

@ -17,8 +17,7 @@ use common_ecs::{Job, Origin, ParMode, Phase, System};
use rand::Rng; use rand::Rng;
use rayon::iter::ParallelIterator; use rayon::iter::ParallelIterator;
use specs::{ use specs::{
shred, Entities, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, shred, Entities, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, WriteStorage,
SystemData, WriteStorage,
}; };
use vek::*; use vek::*;

View File

@ -22,8 +22,8 @@ use common_base::prof_span;
use common_ecs::{Job, Origin, ParMode, Phase, System}; use common_ecs::{Job, Origin, ParMode, Phase, System};
use rayon::iter::ParallelIterator; use rayon::iter::ParallelIterator;
use specs::{ use specs::{
shred, Entities, Entity, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, shred, Entities, Entity, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData,
SystemData, WriteStorage, WriteStorage,
}; };
#[derive(SystemData)] #[derive(SystemData)]

View File

@ -1,6 +1,5 @@
use specs::{ use specs::{
shred, Entities, LazyUpdate, LendJoin, Read, ReadExpect, ReadStorage, shred, Entities, LazyUpdate, LendJoin, Read, ReadExpect, ReadStorage, SystemData, WriteStorage,
SystemData, WriteStorage,
}; };
use common::{ use common::{

View File

@ -9,10 +9,7 @@ use common::{
uid::IdMaps, uid::IdMaps,
}; };
use common_ecs::{Job, Origin, Phase, System}; use common_ecs::{Job, Origin, Phase, System};
use specs::{ use specs::{shred, Entities, Join, Read, ReadExpect, ReadStorage, SystemData, WriteStorage};
shred, Entities, Join, Read, ReadExpect, ReadStorage, SystemData,
WriteStorage,
};
use vek::*; use vek::*;
#[derive(SystemData)] #[derive(SystemData)]

View File

@ -6,8 +6,8 @@ use common_base::prof_span;
use common_ecs::{Job, Origin, Phase, System}; use common_ecs::{Job, Origin, Phase, System};
use common_net::sync::InterpolatableComponent; use common_net::sync::InterpolatableComponent;
use specs::{ use specs::{
prelude::ParallelIterator, shred, Entities, ParJoin, Read, ReadStorage, prelude::ParallelIterator, shred, Entities, ParJoin, Read, ReadStorage, SystemData,
SystemData, WriteStorage, WriteStorage,
}; };
#[derive(SystemData)] #[derive(SystemData)]

View File

@ -22,9 +22,8 @@ use common_base::{prof_span, span};
use common_ecs::{Job, Origin, ParMode, Phase, PhysicsMetrics, System}; use common_ecs::{Job, Origin, ParMode, Phase, PhysicsMetrics, System};
use rayon::iter::ParallelIterator; use rayon::iter::ParallelIterator;
use specs::{ use specs::{
shred, shred, Entities, Entity, Join, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData,
Entities, Entity, Join, LendJoin, ParJoin, Read, ReadExpect, ReadStorage, SystemData, Write, Write, WriteExpect, WriteStorage,
WriteExpect, WriteStorage,
}; };
use std::ops::Range; use std::ops::Range;
use vek::*; use vek::*;

View File

@ -17,8 +17,8 @@ use common::vol::ReadVol;
use common_ecs::{Job, Origin, Phase, System}; use common_ecs::{Job, Origin, Phase, System};
use rand::Rng; use rand::Rng;
use specs::{ use specs::{
shred, Entities, Entity as EcsEntity, Join, Read, ReadExpect, ReadStorage, shred, Entities, Entity as EcsEntity, Join, Read, ReadExpect, ReadStorage, SystemData,
SystemData, WriteStorage, WriteStorage,
}; };
use std::time::Duration; use std::time::Duration;
use vek::*; use vek::*;

View File

@ -15,10 +15,7 @@ use common::{
}; };
use common_ecs::{Job, Origin, Phase, System}; use common_ecs::{Job, Origin, Phase, System};
use rand::Rng; use rand::Rng;
use specs::{ use specs::{shred, Entities, Join, LendJoin, Read, ReadStorage, SystemData, WriteStorage};
shred, Entities, Join, LendJoin, Read, ReadStorage, SystemData,
WriteStorage,
};
use vek::*; use vek::*;
#[derive(SystemData)] #[derive(SystemData)]

View File

@ -12,8 +12,7 @@ use common::{
}; };
use common_ecs::{Job, Origin, Phase, System}; use common_ecs::{Job, Origin, Phase, System};
use specs::{ use specs::{
shred, Entities, LendJoin, Read, ReadExpect, ReadStorage, SystemData, shred, Entities, LendJoin, Read, ReadExpect, ReadStorage, SystemData, Write, WriteStorage,
Write, WriteStorage,
}; };
const ENERGY_REGEN_ACCEL: f32 = 1.0; const ENERGY_REGEN_ACCEL: f32 = 1.0;

View File

@ -26,10 +26,7 @@ use common::{
terrain::TerrainGrid, terrain::TerrainGrid,
uid::{IdMaps, Uid}, uid::{IdMaps, Uid},
}; };
use specs::{ use specs::{shred, Entities, Entity as EcsEntity, Read, ReadExpect, ReadStorage, SystemData};
shred, Entities, Entity as EcsEntity, Read, ReadExpect, ReadStorage,
SystemData,
};
// TODO: Move rtsim back into AgentData after rtsim2 when it has a separate // TODO: Move rtsim back into AgentData after rtsim2 when it has a separate
// crate // crate