Merge branch 'xMAC94x/update-toolchain' into 'master'

update toolchain to `nightly-2021-09-24`

See merge request veloren/veloren!2862
This commit is contained in:
Marcel 2021-09-26 19:25:02 +00:00
commit cea927efb6
37 changed files with 47 additions and 115 deletions

View File

@ -13,7 +13,7 @@ variables:
# https://docs.gitlab.com/ee/ci/yaml/#shallow-cloning
GIT_DEPTH: 3
GIT_CLEAN_FLAGS: -f
CACHE_IMAGE_TAG: 5d0b61ad
CACHE_IMAGE_TAG: c94d1580
default:
# https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-pending-pipelines

8
Cargo.lock generated
View File

@ -2739,9 +2739,9 @@ dependencies = [
[[package]]
name = "kiddo"
version = "0.1.4"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73e70400c6435a3f5e4d7bfb406af50bc66950cc8f24f45488d66f47bf3f5e25"
checksum = "66d93815d7b36a79b35bafa5227738f81e2072764235f1369a412de0e16459e7"
dependencies = [
"num-traits",
]
@ -3801,9 +3801,9 @@ dependencies = [
[[package]]
name = "packed_simd_2"
version = "0.3.5"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e64858a2d3733fdd61adfdd6da89aa202f7ff0e741d2fc7ed1e452ba9dc99d7"
checksum = "71c0c06716cfc81616fa8e22b721ce92fecd594508bc0eb3d04ae3ef35ac10c5"
dependencies = [
"cfg-if 0.1.10",
"libm 0.1.4",

View File

@ -1,8 +1,4 @@
#![allow(incomplete_features)]
#![feature(
const_generics,
const_evaluatable_checked,
const_fn_floating_point_arithmetic
)]
#![feature(generic_const_exprs, const_fn_floating_point_arithmetic)]
pub mod msg;
pub mod sync;

View File

@ -375,6 +375,7 @@ impl<T> AbilitySet<T> {
}
}
#[allow(clippy::derivable_impls)]
impl Default for AbilitySet<CharacterAbility> {
fn default() -> Self {
AbilitySet {

View File

@ -4,11 +4,9 @@
#![allow(clippy::option_map_unit_fn)]
#![deny(clippy::clone_on_ref_ptr)]
#![feature(
arbitrary_enum_discriminant,
associated_type_defaults,
bool_to_option,
fundamental,
iter_map_while,
label_break_value,
option_zip,
trait_alias,

View File

@ -41,7 +41,7 @@ pub enum GameMode {
#[derive(Copy, Clone, Default, Debug)]
pub struct PlayerEntity(pub Option<Entity>);
#[derive(Copy, Clone, Debug)]
#[derive(Copy, Clone, Debug, Default)]
pub struct PlayerPhysicsSetting {
/// true if the client wants server-authoratative physics (e.g. to use
/// airships properly)
@ -51,15 +51,6 @@ pub struct PlayerPhysicsSetting {
pub server_force: bool,
}
impl Default for PlayerPhysicsSetting {
fn default() -> PlayerPhysicsSetting {
PlayerPhysicsSetting {
client_optin: false,
server_force: false,
}
}
}
impl PlayerPhysicsSetting {
pub fn server_authoritative(&self) -> bool { self.client_optin || self.server_force }

View File

@ -54,12 +54,9 @@ fn skills_from_nodes(nodes: &[SkillNode]) -> Vec<(Skill, Option<u16>)> {
skills
}
#[derive(Default)]
pub struct SkillSetBuilder(SkillSet);
impl Default for SkillSetBuilder {
fn default() -> Self { Self(SkillSet::default()) }
}
impl SkillSetBuilder {
/// Creates `SkillSetBuilder` from `asset_specifier`
#[must_use]

View File

@ -148,7 +148,7 @@ impl CharacterBehavior for Data {
// and applying `pitch` to get needed orientation.
let look_dir = data.inputs.look_dir;
let xy_dir = Dir::from_unnormalized(Vec3::new(look_dir.x, look_dir.y, 0.0))
.unwrap_or_else(Dir::default);
.unwrap_or_default();
let pitch = xy_dir.rotation_between(look_dir);
Ori::from(Vec3::new(

View File

@ -34,6 +34,7 @@ pub struct PluginData {
pub struct Plugin {
data: PluginData,
modules: Vec<PluginModule>,
#[allow(dead_code)]
files: HashMap<PathBuf, Vec<u8>>,
}

View File

@ -25,6 +25,7 @@ pub struct PluginModule {
events: HashSet<String>,
allocator: Function,
memory: Memory,
#[allow(dead_code)]
name: String,
}

View File

@ -1,4 +1,4 @@
#![feature(bool_to_option, array_map)]
#![feature(bool_to_option)]
#![allow(clippy::option_map_unit_fn)]
mod aura;

View File

@ -74,6 +74,7 @@ pub struct ProtocolMetricCache {
sdata_frames_b: GenericCounter<AtomicU64>,
rdata_frames_t: GenericCounter<AtomicU64>,
rdata_frames_b: GenericCounter<AtomicU64>,
#[allow(dead_code)]
ping: GenericGauge<AtomicI64>,
}

View File

@ -30,6 +30,7 @@ where
D: UnreliableDrain<DataFormat = MpscMsg>,
{
drain: D,
#[allow(dead_code)]
last: Instant,
metrics: ProtocolMetricCache,
}

View File

@ -14,6 +14,7 @@ use std::{
struct StreamInfo {
pub(crate) guaranteed_bandwidth: Bandwidth,
pub(crate) prio: Prio,
#[allow(dead_code)]
pub(crate) promises: Promises,
pub(crate) messages: VecDeque<OTMessage>,
}

View File

@ -71,6 +71,7 @@ where
notify_closing_streams: Vec<Sid>,
pending_shutdown: bool,
drain: D,
#[allow(dead_code)]
last: Instant,
metrics: ProtocolMetricCache,
}

View File

@ -32,6 +32,7 @@ where
notify_closing_streams: Vec<Sid>,
pending_shutdown: bool,
drain: D,
#[allow(dead_code)]
last: Instant,
metrics: ProtocolMetricCache,
}

View File

@ -82,8 +82,10 @@ pub struct Stream {
local_pid: Pid,
remote_pid: Pid,
sid: Sid,
#[allow(dead_code)]
prio: Prio,
promises: Promises,
#[allow(dead_code)]
guaranteed_bandwidth: Bandwidth,
send_closed: Arc<AtomicBool>,
a2b_msg_s: crossbeam_channel::Sender<(Sid, Bytes)>,

View File

@ -525,6 +525,7 @@ pub struct QuicDrain {
#[cfg(feature = "quic")]
#[derive(Debug)]
pub struct QuicSink {
#[allow(dead_code)]
con: quinn::Connection,
bi: quinn::IncomingBiStreams,
recvstreams_r: mpsc::UnboundedReceiver<QuicStream>,

View File

@ -32,6 +32,7 @@ pub(crate) type S2bShutdownBparticipant = (Duration, oneshot::Sender<Result<(),
pub(crate) type B2sPrioStatistic = (Pid, u64, u64);
#[derive(Debug)]
#[allow(dead_code)]
struct ChannelInfo {
cid: Cid,
cid_string: String, //optimisationmetrics
@ -39,7 +40,9 @@ struct ChannelInfo {
#[derive(Debug)]
struct StreamInfo {
#[allow(dead_code)]
prio: Prio,
#[allow(dead_code)]
promises: Promises,
send_closed: Arc<AtomicBool>,
b2a_msg_recv_s: Mutex<async_channel::Sender<Bytes>>,

View File

@ -36,6 +36,7 @@ use tracing::*;
#[derive(Debug)]
struct ParticipantInfo {
secret: u128,
#[allow(dead_code)]
s2b_create_channel_s: mpsc::UnboundedSender<S2bCreateChannel>,
s2b_shutdown_bparticipant_s: Option<oneshot::Sender<S2bShutdownBparticipant>>,
}

View File

@ -1 +1 @@
nightly-2021-07-06
nightly-2021-09-24

View File

@ -1,7 +1,4 @@
#[derive(Default)]
pub struct Input {
// TODO: Use this type to manage server input.
}
impl Default for Input {
fn default() -> Self { Input {} }
}

View File

@ -75,6 +75,7 @@ pub enum BanErrorKind {
}
#[derive(Debug)]
#[allow(dead_code)]
pub struct BanError {
kind: BanErrorKind,
/// Uuid of affected user

View File

@ -1662,9 +1662,9 @@ impl<'a> AgentData<'a> {
Some((entity, *e_pos))
} else if let Some(villain_info) = guard_duty(e_health, e_alignment) {
Some(villain_info)
} else if rtsim_remember(e_stats, agent, event_emitter) {
Some((entity, *e_pos))
} else if npc_sees_cultist(e_stats, e_inventory, agent, event_emitter) {
} else if rtsim_remember(e_stats, agent, event_emitter)
|| npc_sees_cultist(e_stats, e_inventory, agent, event_emitter)
{
Some((entity, *e_pos))
} else {
None

View File

@ -87,7 +87,7 @@ impl Animation for SpinAnimation {
next.head.orientation = Quaternion::rotation_y(movement1 * 0.1 - movement2 * -0.1)
* Quaternion::rotation_z(1.07 + movement1 * 0.4 + movement2 * -1.5);
next.torso.orientation = Quaternion::rotation_z(movement2 * 6.28);
next.torso.orientation = Quaternion::rotation_z(movement2 * std::f32::consts::TAU);
}
if let Some(ToolKind::Axe | ToolKind::Hammer | ToolKind::Dagger) = active_tool_kind {

View File

@ -27,21 +27,12 @@ pub enum SlotContents {
Ability4,
}
#[derive(Clone, Debug)]
#[derive(Clone, Copy, Default)]
pub struct State {
pub slots: [Option<SlotContents>; 10],
inputs: [bool; 10],
}
impl Default for State {
fn default() -> Self {
Self {
slots: [None; 10],
inputs: [false; 10],
}
}
}
impl State {
pub fn new(slots: [Option<SlotContents>; 10]) -> Self {
Self {

View File

@ -3,7 +3,6 @@
#![allow(clippy::option_map_unit_fn)]
#![deny(clippy::clone_on_ref_ptr)]
#![feature(
array_map,
array_methods,
array_zip,
bool_to_option,

View File

@ -378,6 +378,8 @@ impl Controls {
.position(|i| i.character.id == Some(id))
});
// TODO: this appears to be instance of https://github.com/rust-lang/rust-clippy/issues/7579
#[allow(clippy::if_same_then_else)]
if let Some(error) = error {
// TODO: use more user friendly errors with suggestions on potential solutions
// instead of directly showing error message here

View File

@ -209,6 +209,7 @@ pub enum ShadowMode {
Cheap,
}
#[allow(clippy::derivable_impls)]
impl Default for ShadowMode {
fn default() -> Self { ShadowMode::Map(Default::default()) }
}

View File

@ -310,7 +310,7 @@ impl Renderer {
| (adapter.features() & wgpu_profiler::GpuProfiler::REQUIRED_WGPU_FEATURES),
limits,
},
trace_path.as_deref(),
trace_path,
))?;
// Set error handler for wgpu errors

View File

@ -136,11 +136,11 @@ pub mod con_settings {
pub scroll_y: Axis,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(default)]
pub struct GameAnalogButton {}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(default)]
pub struct MenuAnalogButton {}
@ -246,12 +246,4 @@ pub mod con_settings {
}
}
}
impl Default for GameAnalogButton {
fn default() -> Self { Self {} }
}
impl Default for MenuAnalogButton {
fn default() -> Self { Self {} }
}
}

View File

@ -19,7 +19,7 @@ impl Background {
}
}
#[derive(Clone, Copy)]
#[derive(Clone, Copy, Default)]
pub struct Style {
background: Option<Background>,
check: Option<image::Handle>,
@ -82,12 +82,3 @@ impl Style {
self.background.as_ref().map(|b| b.default)
}
}
impl Default for Style {
fn default() -> Self {
Self {
background: None,
check: None,
}
}
}

View File

@ -875,12 +875,7 @@ impl Ui {
switch_to_plain_state!();
// Mesh should already be cached.
mesh.push_mesh(
text_cache
.get(&widget_id)
.as_deref()
.unwrap_or(&Mesh::new()),
);
mesh.push_mesh(text_cache.get(&widget_id).unwrap_or(&Mesh::new()));
},
PrimitiveKind::Rectangle { color } => {
let color = srgba_to_linear(color.to_fsa().into());

View File

@ -43,7 +43,7 @@ deflate = { version = "0.9.1", optional = true }
flate2 = { version = "1.0.20", optional = true }
num-traits = { version = "0.2", optional = true }
fallible-iterator = { version = "0.2.0", optional = true }
kiddo = { version = "0.1.4", optional = true }
kiddo = { version = "0.1.5", optional = true }
rstar = { version = "0.9", optional = true }
clap = { version = "2.33.3", optional = true }

View File

@ -7,13 +7,7 @@
)]
#![allow(clippy::branches_sharing_code)] // TODO: evaluate
#![deny(clippy::clone_on_ref_ptr)]
#![feature(
arbitrary_enum_discriminant,
bool_to_option,
const_panic,
label_break_value,
array_map
)]
#![feature(bool_to_option, const_panic, label_break_value)]
mod all;
mod block;

View File

@ -33,6 +33,7 @@ impl Location {
#[derive(Clone, Debug)]
pub struct Kingdom {
#[allow(dead_code)]
region_name: String,
}

View File

@ -274,24 +274,14 @@ impl<V: Copy + Default> LaborMap<V> {
}
}
#[derive(Debug)]
#[derive(Debug, Default)]
pub struct AreaResources {
pub resource_sum: GoodMap<f32>,
pub resource_chunks: GoodMap<f32>,
pub chunks: u32,
}
impl Default for AreaResources {
fn default() -> Self {
Self {
resource_sum: GoodMap::default(),
resource_chunks: GoodMap::default(),
chunks: 0,
}
}
}
#[derive(Debug)]
#[derive(Debug, Default)]
pub struct NaturalResources {
// resources per distance, we should increase labor cost for far resources
pub per_area: Vec<AreaResources>,
@ -301,16 +291,6 @@ pub struct NaturalResources {
pub average_yield_per_chunk: GoodMap<f32>,
}
impl Default for NaturalResources {
fn default() -> Self {
Self {
per_area: Vec::new(),
chunks_per_resource: GoodMap::default(),
average_yield_per_chunk: GoodMap::default(),
}
}
}
#[derive(Debug, Deserialize)]
pub struct RawProfessions(Vec<RawProfession>);
@ -383,21 +363,12 @@ pub struct TradeDelivery {
pub supply: GoodMap<f32>, // maximum amount available, at the time of interaction
}
#[derive(Debug)]
#[derive(Debug, Default)]
pub struct TradeInformation {
pub orders: DHashMap<Id<Site>, Vec<TradeOrder>>, // per provider
pub deliveries: DHashMap<Id<Site>, Vec<TradeDelivery>>, // per receiver
}
impl Default for TradeInformation {
fn default() -> Self {
Self {
orders: Default::default(),
deliveries: Default::default(),
}
}
}
#[derive(Debug)]
pub struct NeighborInformation {
pub id: Id<Site>,