diff --git a/examples/with_decl_macro.rs b/examples/with_decl_macro.rs index 6db0573..ba2e09d 100644 --- a/examples/with_decl_macro.rs +++ b/examples/with_decl_macro.rs @@ -7,7 +7,7 @@ use core::any::Any; -use trait_cast::{make_trait_castable_decl, TraitcastableAny, TraitcastableAnyInfra}; +use trait_cast::{TraitcastableAny, TraitcastableAnyInfra, make_trait_castable_decl}; struct HybridPet { name: String, diff --git a/examples/with_decl_macro_generic_struct.rs b/examples/with_decl_macro_generic_struct.rs index d0a8df3..dc67b6d 100644 --- a/examples/with_decl_macro_generic_struct.rs +++ b/examples/with_decl_macro_generic_struct.rs @@ -4,7 +4,7 @@ use core::{any::type_name, fmt::Display}; -use trait_cast::{make_trait_castable_decl, TraitcastableAny, TraitcastableAnyInfra}; +use trait_cast::{TraitcastableAny, TraitcastableAnyInfra, make_trait_castable_decl}; struct HybridPet { name: T, diff --git a/examples/with_decl_macro_struct.rs b/examples/with_decl_macro_struct.rs index 01d8a16..4c5f6e5 100644 --- a/examples/with_decl_macro_struct.rs +++ b/examples/with_decl_macro_struct.rs @@ -5,7 +5,7 @@ use core::any::type_name; -use trait_cast::{make_trait_castable_decl, TraitcastableAny, TraitcastableAnyInfra}; +use trait_cast::{TraitcastableAny, TraitcastableAnyInfra, make_trait_castable_decl}; make_trait_castable_decl! { HybridPet => (Dog, Dog>, Cat), diff --git a/examples/with_proc_macro.rs b/examples/with_proc_macro.rs index 1a0bdd6..f20d613 100644 --- a/examples/with_proc_macro.rs +++ b/examples/with_proc_macro.rs @@ -8,7 +8,7 @@ #![cfg_attr(feature = "downcast_unchecked", feature(downcast_unchecked))] #![feature(ptr_metadata)] use trait_cast::{ - make_trait_castable, TraitcastableAny, TraitcastableAnyInfra, TraitcastableAnyInfraExt, + TraitcastableAny, TraitcastableAnyInfra, TraitcastableAnyInfraExt, make_trait_castable, }; #[make_trait_castable(Dog, Cat)] diff --git a/examples/with_proc_macro_enum.rs b/examples/with_proc_macro_enum.rs index d4f9ff1..cc6b33e 100644 --- a/examples/with_proc_macro_enum.rs +++ b/examples/with_proc_macro_enum.rs @@ -3,7 +3,7 @@ #![cfg_attr(feature = "downcast_unchecked", feature(downcast_unchecked))] #![feature(ptr_metadata)] -use trait_cast::{make_trait_castable, TraitcastableAny, TraitcastableAnyInfra}; +use trait_cast::{TraitcastableAny, TraitcastableAnyInfra, make_trait_castable}; #[make_trait_castable(Dog, Cat)] enum HybridPet { diff --git a/src/test.rs b/src/test.rs index 45e5369..072a04a 100644 --- a/src/test.rs +++ b/src/test.rs @@ -1,4 +1,4 @@ -use crate::{make_trait_castable_decl, TraitcastableAny, TraitcastableAnyInfra}; +use crate::{TraitcastableAny, TraitcastableAnyInfra, make_trait_castable_decl}; use alloc::boxed::Box; const fn _test_empty_trait_cast_targets() { diff --git a/src/trait_cast.rs b/src/trait_cast.rs index b4fbce9..34fa1f8 100644 --- a/src/trait_cast.rs +++ b/src/trait_cast.rs @@ -1,5 +1,5 @@ use core::{ - any::{type_name, Any, TypeId}, + any::{Any, TypeId, type_name}, fmt::{self, Debug, Formatter}, ptr, ptr::DynMetadata, @@ -379,9 +379,9 @@ impl, Target: Sized + 'static> TraitcastableA #[cfg(feature = "alloc")] impl< - Src: TraitcastableAnyInfra + ?Sized + Send + Sync, - Target: ?Sized + 'static + Send + Sync, - > TraitcastableAnyInfraExt for Arc + Src: TraitcastableAnyInfra + ?Sized + Send + Sync, + Target: ?Sized + 'static + Send + Sync, +> TraitcastableAnyInfraExt for Arc { type Output = Arc;