mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'tygyh/Resolve-all-'#-allow(clippy--needless_update)]'-error-supressions' into 'master'
Tygyh/resolve all '# allow(clippy needless update)]' error supressions See merge request veloren/veloren!3034
This commit is contained in:
commit
55be707c7b
@ -201,7 +201,6 @@ pub struct Server {
|
||||
|
||||
impl Server {
|
||||
/// Create a new `Server`
|
||||
#[allow(clippy::needless_update)] // TODO: Pending review in #587
|
||||
pub fn new(
|
||||
settings: Settings,
|
||||
editable_settings: EditableSettings,
|
||||
@ -356,7 +355,6 @@ impl Server {
|
||||
// Load default map from assets.
|
||||
FileOpts::LoadAsset(DEFAULT_WORLD_MAP.into())
|
||||
},
|
||||
..WorldOpts::default()
|
||||
},
|
||||
state.thread_pool(),
|
||||
);
|
||||
|
@ -11,7 +11,6 @@ use world::{sim, World};
|
||||
const CENTER: Vec2<i32> = Vec2 { x: 512, y: 512 };
|
||||
const GEN_SIZE: i32 = 4;
|
||||
|
||||
#[allow(clippy::needless_update)] // TODO: Pending review in #587
|
||||
pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
let pool = rayon::ThreadPoolBuilder::new().build().unwrap();
|
||||
// Generate chunks here to test
|
||||
@ -24,7 +23,6 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
||||
// directly with a closure.
|
||||
seed_elements: true,
|
||||
world_file: sim::FileOpts::LoadAsset(sim::DEFAULT_WORLD_MAP.into()),
|
||||
..Default::default()
|
||||
},
|
||||
&pool,
|
||||
);
|
||||
|
@ -23,7 +23,6 @@ use veloren_world::{
|
||||
const W: usize = 1024;
|
||||
const H: usize = 1024;
|
||||
|
||||
#[allow(clippy::needless_update)] // TODO: Pending review in #587
|
||||
fn main() {
|
||||
FmtSubscriber::builder()
|
||||
.with_max_level(Level::ERROR)
|
||||
@ -48,9 +47,8 @@ fn main() {
|
||||
WorldOpts {
|
||||
seed_elements: false,
|
||||
world_file: sim::FileOpts::LoadAsset(veloren_world::sim::DEFAULT_WORLD_MAP.into()),
|
||||
// world_file: sim::FileOpts::Load(_map_file),
|
||||
// world_file: sim::FileOpts::Save(sim::SizeOpts::default()),
|
||||
..WorldOpts::default()
|
||||
/* world_file: sim::FileOpts::Load(_map_file),
|
||||
* world_file: sim::FileOpts::Save(sim::SizeOpts::default()), */
|
||||
},
|
||||
&threadpool,
|
||||
);
|
||||
|
@ -178,7 +178,6 @@ impl Castle {
|
||||
|
||||
pub fn radius(&self) -> f32 { 200.0 }
|
||||
|
||||
#[allow(clippy::needless_update)] // TODO: Pending review in #587
|
||||
pub fn spawn_rules(&self, wpos: Vec2<i32>) -> SpawnRules {
|
||||
SpawnRules {
|
||||
trees: wpos.distance_squared(self.origin) > self.radius.pow(2),
|
||||
|
@ -548,7 +548,6 @@ impl Settlement {
|
||||
|
||||
pub fn radius(&self) -> f32 { 400.0 }
|
||||
|
||||
#[allow(clippy::needless_update)] // TODO: Pending review in #587
|
||||
pub fn spawn_rules(&self, wpos: Vec2<i32>) -> SpawnRules {
|
||||
SpawnRules {
|
||||
trees: self
|
||||
|
@ -119,7 +119,6 @@ impl Dungeon {
|
||||
.unwrap_or(200.0)
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_update)] // TODO: Pending review in #587
|
||||
pub fn spawn_rules(&self, wpos: Vec2<i32>) -> SpawnRules {
|
||||
SpawnRules {
|
||||
trees: wpos.distance_squared(self.origin) > 64i32.pow(2),
|
||||
|
Loading…
Reference in New Issue
Block a user