Skip to content

Commit

Permalink
Make the ArchipelagoRef impl Debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
andriyDev committed Aug 17, 2024
1 parent 5e3939c commit 35ad18a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/bevy_landmass/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,17 @@ pub struct ArchipelagoRef<CS: CoordinateSystem> {
pub type ArchipelagoRef2d = ArchipelagoRef<TwoD>;
pub type ArchipelagoRef3d = ArchipelagoRef<ThreeD>;

impl<CS: CoordinateSystem<Coordinate: std::fmt::Debug>> std::fmt::Debug
for ArchipelagoRef<CS>
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("ArchipelagoRef")
.field("entity", &self.entity)
.field("marker", &self.marker)
.finish()
}
}

impl<CS: CoordinateSystem> ArchipelagoRef<CS> {
pub fn new(entity: Entity) -> Self {
Self { entity, marker: Default::default() }
Expand Down

0 comments on commit 35ad18a

Please sign in to comment.