Browse Source

Re-disable incremental just for common-systems, small fix in plugin

crate, more new clippy fixes
merge-requests/2322/head
Imbris 2 months ago
parent
commit
23eca4c3f6
  1. 2
      Cargo.toml
  2. 2
      common/systems/src/character_behavior.rs
  3. 2
      plugin/rt/src/lib.rs
  4. 14
      server/src/events/inventory_manip.rs
  5. 2
      server/src/sys/agent.rs
  6. 8
      voxygen/src/audio/sfx/event_mapper/movement/tests.rs
  7. 2
      voxygen/src/hud/mod.rs
  8. 2
      voxygen/src/mesh/terrain.rs
  9. 1
      voxygen/src/ui/ice/renderer/widget/slider.rs
  10. 1
      voxygen/src/ui/mod.rs
  11. 6
      voxygen/src/ui/widgets/slot.rs
  12. 1
      world/examples/water.rs
  13. 1
      world/src/lib.rs

2
Cargo.toml

@ -44,6 +44,8 @@ opt-level = 2
opt-level = 3
[profile.dev.package."veloren-common"]
opt-level = 2
[profile.dev.package."veloren-common-systems"]
incremental = false
[profile.dev.package."veloren-client"]
opt-level = 2
[profile.dev.package."veloren-server"]

2
common/systems/src/character_behavior.rs

@ -257,7 +257,7 @@ impl<'a> System<'a> for Sys {
}
// Controller actions
let actions = std::mem::replace(&mut controller.actions, Vec::new());
let actions = std::mem::take(&mut controller.actions);
let mut join_struct = JoinStruct {
entity,

2
plugin/rt/src/lib.rs

@ -1,5 +1,3 @@
#![feature(const_fn)]
pub extern crate plugin_derive;
pub mod retrieve;

14
server/src/events/inventory_manip.rs

@ -781,10 +781,9 @@ mod tests {
let position = Pos(Vec3::zero());
let item_position = Pos(Vec3::one());
assert_eq!(
within_pickup_range(test_cylinder(position), || test_cylinder(item_position),),
true
);
assert!(within_pickup_range(test_cylinder(position), || {
test_cylinder(item_position)
},),);
}
#[test]
@ -792,9 +791,8 @@ mod tests {
let position = Pos(Vec3::zero());
let item_position = Pos(Vec3::one() * 500.0);
assert_eq!(
within_pickup_range(test_cylinder(position), || test_cylinder(item_position),),
false
);
assert!(!within_pickup_range(test_cylinder(position), || {
test_cylinder(item_position)
},),);
}
}

2
server/src/sys/agent.rs

@ -1,3 +1,5 @@
#![allow(clippy::branches_sharing_code)] // TODO: evaluate
use crate::rtsim::{Entity as RtSimData, RtSim};
use common::{
comp::{

8
voxygen/src/audio/sfx/event_mapper/movement/tests.rs

@ -15,7 +15,7 @@ fn no_item_config_no_emit() {
let previous_state = PreviousEntityState::default();
let result = MovementEventMapper::should_emit(&previous_state, None);
assert_eq!(result, false);
assert!(!result);
}
#[test]
@ -39,7 +39,7 @@ fn config_but_played_since_threshold_no_emit() {
Some((&SfxEvent::Run(BlockKind::Grass), &trigger_item)),
);
assert_eq!(result, false);
assert!(!result);
}
#[test]
@ -62,7 +62,7 @@ fn config_and_not_played_since_threshold_emits() {
Some((&SfxEvent::Run(BlockKind::Grass), &trigger_item)),
);
assert_eq!(result, true);
assert!(result);
}
#[test]
@ -87,7 +87,7 @@ fn same_previous_event_elapsed_emits() {
Some((&SfxEvent::Run(BlockKind::Grass), &trigger_item)),
);
assert_eq!(result, true);
assert!(result);
}
#[test]

2
voxygen/src/hud/mod.rs

@ -956,7 +956,7 @@ impl Hud {
interactable: Option<Interactable>,
) -> Vec<Event> {
span!(_guard, "update_layout", "Hud::update_layout");
let mut events = std::mem::replace(&mut self.events, Vec::new());
let mut events = core::mem::take(&mut self.events);
let (ref mut ui_widgets, ref mut item_tooltip_manager, ref mut tooltip_manager) =
&mut self.ui.set_widgets();
// self.ui.set_item_widgets(); pulse time for pulsating elements

2
voxygen/src/mesh/terrain.rs

@ -1,3 +1,5 @@
#![allow(clippy::clone_on_copy)] // TODO: fix after wgpu branch
use crate::{
mesh::{
greedy::{self, GreedyConfig, GreedyMesh},

1
voxygen/src/ui/ice/renderer/widget/slider.rs

@ -79,6 +79,7 @@ impl slider::Renderer for IcedRenderer {
mouse::Interaction::Idle
};
#[allow(clippy::branches_sharing_code)] // TODO: remove
#[allow(clippy::if_same_then_else)] // TODO: remove
let primitives = if style.labels {
// TODO text label on left and right ends

1
voxygen/src/ui/mod.rs

@ -530,6 +530,7 @@ impl Ui {
});
if glyph_missing {
#[allow(clippy::branches_sharing_code)] // TODO: evaluate (ask sharp)
if *retry {
// If a glyph was missing and this was our second try, we know something was
// messed up during the glyph_cache redraw. It is possible that

6
voxygen/src/ui/widgets/slot.rs

@ -194,8 +194,8 @@ where
pub fn maintain(&mut self, ui: &mut conrod_core::UiCell) -> Vec<Event<S>> {
// Clear
let slot_ids = std::mem::replace(&mut self.slot_ids, Vec::new());
let slots = std::mem::replace(&mut self.slots, Vec::new());
let slot_ids = core::mem::take(&mut self.slot_ids);
let slots = core::mem::take(&mut self.slots);
// Detect drops by of selected item by clicking in empty space
if let ManagerState::Selected(_, slot) = self.state {
@ -295,7 +295,7 @@ where
// }
}
std::mem::replace(&mut self.events, Vec::new())
core::mem::take(&mut self.events)
}
fn update(

1
world/examples/water.rs

@ -1,3 +1,4 @@
#![allow(clippy::branches_sharing_code)] // TODO: evaluate
use common::{
terrain::{
map::{MapConfig, MapDebug, MapSample},

1
world/src/lib.rs

@ -5,6 +5,7 @@
clippy::blocks_in_if_conditions,
clippy::too_many_arguments
)]
#![allow(clippy::branches_sharing_code)] // TODO: evaluate
#![deny(clippy::clone_on_ref_ptr)]
#![feature(
arbitrary_enum_discriminant,

Loading…
Cancel
Save