Skip to content

Commit

Permalink
Fix Clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy2222 committed Feb 21, 2024
1 parent a917d7f commit d8b806c
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/conf/src/io.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{Context, Result};
use async_std::{fs, path::Path};
use bevy::prelude::info;
use tracing::info;

/// Loads configuration file to a string. Returns Ok(None) if the configuration
/// file does not exist.
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ macro_rules! log_full_error {
use std::error::Error;
use std::fmt::Write;

use bevy::prelude::error;
use tracing::error;

let mut error_message = format!("{}", $err);
let mut error: &dyn Error = &$err;
Expand Down
3 changes: 2 additions & 1 deletion crates/loader/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ de_types.workspace = true

# Other
bevy.workspace = true
iyes_progress.workspace = true
futures-lite.workspace = true
iyes_progress.workspace = true
tracing.workspace = true
1 change: 1 addition & 0 deletions crates/menu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ async-std.workspace = true
bevy.workspace = true
futures-lite.workspace = true
thiserror.workspace = true
tracing.workspace = true
2 changes: 1 addition & 1 deletion crates/objects/src/collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{hash::Hash, path::PathBuf};

use ahash::AHashMap;
use bevy::{
asset::{Asset, AssetPath, LoadState, RecursiveDependencyLoadState},
asset::{Asset, AssetPath, RecursiveDependencyLoadState},
prelude::*,
};
use enum_iterator::Sequence;
Expand Down
6 changes: 3 additions & 3 deletions crates/objects/src/solids.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use ahash::AHashMap;
use anyhow::Context;
use bevy::{
asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext, LoadedAsset},
asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext},
ecs::system::SystemParam,
prelude::*,
reflect::{TypePath, TypeUuid},
reflect::TypePath,
utils::BoxedFuture,
};
use de_core::state::AppState;
Expand Down Expand Up @@ -135,7 +135,7 @@ impl AssetLoader for SolidObjectLoader {
&'a self,
reader: &'a mut Reader,
_settings: &'a Self::Settings,
load_context: &'a mut LoadContext,
_load_context: &'a mut LoadContext,
) -> BoxedFuture<'a, anyhow::Result<Self::Asset>> {
Box::pin(async move {
let mut bytes = Vec::new();
Expand Down
11 changes: 6 additions & 5 deletions crates/pathing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,17 @@ de_objects.workspace = true
de_types.workspace = true

# Other
ahash.workspace = true
approx.workspace = true
bevy.workspace = true
futures-lite.workspace = true
glam.workspace = true
parry2d.workspace = true
nalgebra.workspace = true
ahash.workspace = true
approx.workspace = true
parry2d.workspace = true
rstar.workspace = true
tinyvec.workspace = true
spade.workspace = true
futures-lite.workspace = true
tinyvec.workspace = true
tracing.workspace = true

[dev-dependencies]
# DE
Expand Down
2 changes: 1 addition & 1 deletion crates/pathing/src/finder.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! This module contains global map shortest path finder.
use ahash::AHashMap;
use bevy::prelude::{debug, info};
use de_map::size::MapBounds;
use de_types::path::Path;
use parry2d::{
Expand All @@ -12,6 +11,7 @@ use parry2d::{
};
use rstar::{PointDistance, RTree, RTreeObject, AABB};
use tinyvec::{ArrayVec, TinyVec};
use tracing::{debug, info};

use crate::{
exclusion::ExclusionArea,
Expand Down
4 changes: 2 additions & 2 deletions crates/spawner/src/despawner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ mod tests {
trace!("-----------------------------------");

assert_eq!(
simple_events.get(&app.world).iter().next().unwrap().data,
simple_events.get(&app.world).read().next().unwrap().data,
TestComponent { value: 1 }
);

Expand All @@ -335,7 +335,7 @@ mod tests {
trace!("-----------------------------------");

assert_eq!(
complex_events.get(&app.world).iter().next().unwrap().data,
complex_events.get(&app.world).read().next().unwrap().data,
ComplexComponent {
value: 2,
value2: ComplexStruct {
Expand Down
7 changes: 2 additions & 5 deletions crates/terrain/src/plugin.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
use bevy::{
asset::{AssetPath, LoadState},
asset::LoadState,
pbr::ExtendedMaterial,
prelude::*,
render::{
render_resource::{AddressMode, SamplerDescriptor},
texture::{ImageAddressMode, ImageSampler, ImageSamplerDescriptor},
},
render::texture::{ImageAddressMode, ImageSampler, ImageSamplerDescriptor},
};
use de_core::{gamestate::GameState, state::AppState};
use iyes_progress::prelude::*;
Expand Down

0 comments on commit d8b806c

Please sign in to comment.