Skip to content

Commit

Permalink
Formatting fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
raldone01 committed Dec 14, 2024
1 parent dc6ccb5 commit 88510fe
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/with_decl_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/with_decl_macro_generic_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Display> {
name: T,
Expand Down
2 changes: 1 addition & 1 deletion examples/with_decl_macro_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i32>, Dog<TestStruct<::core::primitive::i32>>, Cat<u128, u32>),
Expand Down
2 changes: 1 addition & 1 deletion examples/with_proc_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion examples/with_proc_macro_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/test.rs
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions src/trait_cast.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use core::{
any::{type_name, Any, TypeId},
any::{Any, TypeId, type_name},
fmt::{self, Debug, Formatter},
ptr,
ptr::DynMetadata,
Expand Down Expand Up @@ -379,9 +379,9 @@ impl<Src: TraitcastableAnyInfra<Target>, Target: Sized + 'static> TraitcastableA

#[cfg(feature = "alloc")]
impl<
Src: TraitcastableAnyInfra<Target> + ?Sized + Send + Sync,
Target: ?Sized + 'static + Send + Sync,
> TraitcastableAnyInfraExt<Target> for Arc<Src>
Src: TraitcastableAnyInfra<Target> + ?Sized + Send + Sync,
Target: ?Sized + 'static + Send + Sync,
> TraitcastableAnyInfraExt<Target> for Arc<Src>
{
type Output = Arc<Target>;

Expand Down

0 comments on commit 88510fe

Please sign in to comment.