Skip to content

Commit e90db6d

Browse files
committed
Cleanup all use crate as and use crate::{self as usages.
1 parent 273e042 commit e90db6d

File tree

103 files changed

+52
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+52
-169
lines changed

crates/bevy_app/src/app.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,6 @@ mod tests {
15321532
#[test]
15331533
fn test_derive_app_label() {
15341534
use super::AppLabel;
1535-
use crate::{self as bevy_app};
15361535

15371536
#[derive(AppLabel, Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
15381537
struct UnitLabel;
@@ -1664,7 +1663,6 @@ mod tests {
16641663
#[test]
16651664
fn test_extract_sees_changes() {
16661665
use super::AppLabel;
1667-
use crate::{self as bevy_app};
16681666

16691667
#[derive(AppLabel, Clone, Copy, Hash, PartialEq, Eq, Debug)]
16701668
struct MySubApp;

crates/bevy_asset/src/asset_changed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ unsafe impl<A: AsAssetId> QueryFilter for AssetChanged<A> {
287287

288288
#[cfg(test)]
289289
mod tests {
290-
use crate::{self as bevy_asset, AssetEvents, AssetPlugin, Handle};
290+
use crate::{AssetEvents, AssetPlugin, Handle};
291291
use alloc::{vec, vec::Vec};
292292
use core::num::NonZero;
293293
use std::println;

crates/bevy_asset/src/assets.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use crate::asset_changed::AssetChanges;
2-
use crate::{
3-
self as bevy_asset, Asset, AssetEvent, AssetHandleProvider, AssetId, AssetServer, Handle,
4-
UntypedHandle,
5-
};
2+
use crate::{Asset, AssetEvent, AssetHandleProvider, AssetId, AssetServer, Handle, UntypedHandle};
63
use alloc::{sync::Arc, vec::Vec};
74
use bevy_ecs::{
85
prelude::EventWriter,

crates/bevy_asset/src/folder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use alloc::vec::Vec;
22

3-
use crate as bevy_asset;
43
use crate::{Asset, UntypedHandle};
54
use bevy_reflect::TypePath;
65

crates/bevy_asset/src/meta.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use alloc::{
55
};
66

77
use crate::{
8-
self as bevy_asset, loader::AssetLoader, processor::Process, Asset, AssetPath,
9-
DeserializeMetaError, VisitAssetDependencies,
8+
loader::AssetLoader, processor::Process, Asset, AssetPath, DeserializeMetaError,
9+
VisitAssetDependencies,
1010
};
1111
use downcast_rs::{impl_downcast, Downcast};
1212
use ron::ser::PrettyConfig;

crates/bevy_asset/src/reflect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ mod tests {
247247
use alloc::{string::String, vec::Vec};
248248
use core::any::TypeId;
249249

250-
use crate as bevy_asset;
251250
use crate::{Asset, AssetApp, AssetPlugin, ReflectAsset, UntypedHandle};
252251
use bevy_app::App;
253252
use bevy_ecs::reflect::AppTypeRegistry;

crates/bevy_asset/src/server/loaders.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ mod tests {
352352
use bevy_reflect::TypePath;
353353
use bevy_tasks::block_on;
354354

355-
use crate::{self as bevy_asset, Asset};
355+
use crate::Asset;
356356

357357
use super::*;
358358

crates/bevy_ecs/src/bundle.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,6 @@ fn sorted_remove<T: Eq + Ord + Copy>(source: &mut Vec<T>, remove: &[T]) {
17041704

17051705
#[cfg(test)]
17061706
mod tests {
1707-
use crate as bevy_ecs;
17081707
use crate::{component::HookContext, prelude::*, world::DeferredWorld};
17091708
use alloc::vec;
17101709

crates/bevy_ecs/src/change_detection.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,6 @@ mod tests {
12541254
use core::panic::Location;
12551255

12561256
use crate::{
1257-
self as bevy_ecs,
12581257
change_detection::{
12591258
Mut, NonSendMut, Ref, ResMut, TicksMut, CHECK_TICK_THRESHOLD, MAX_CHANGE_AGE,
12601259
},

crates/bevy_ecs/src/component.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//! Types for declaring and storing [`Component`]s.
22
33
use crate::{
4-
self as bevy_ecs,
54
archetype::ArchetypeFlags,
65
bundle::BundleInfo,
76
change_detection::MAX_CHANGE_AGE,
@@ -2225,7 +2224,7 @@ pub fn component_clone_via_clone<C: Clone + Component>(
22252224
/// - Component has [`ReflectFromPtr`](bevy_reflect::ReflectFromPtr) registered
22262225
/// - Component has one of the following registered: [`ReflectFromReflect`](bevy_reflect::ReflectFromReflect),
22272226
/// [`ReflectDefault`](bevy_reflect::std_traits::ReflectDefault), [`ReflectFromWorld`](crate::reflect::ReflectFromWorld)
2228-
///
2227+
///
22292228
/// If any of the conditions is not satisfied, the component will be skipped.
22302229
///
22312230
/// See [`EntityCloneBuilder`](crate::entity::EntityCloneBuilder) for details.

0 commit comments

Comments
 (0)