Skip to content

Format extent and origin types as tuples.#4853

Merged
Wumpf merged 2 commits intogfx-rs:trunkfrom
nical:extents-dbg
Dec 9, 2023
Merged

Format extent and origin types as tuples.#4853
Wumpf merged 2 commits intogfx-rs:trunkfrom
nical:extents-dbg

Conversation

@nical
Copy link
Copy Markdown
Contributor

@nical nical commented Dec 9, 2023

Description

Makes logging a few common types a fair bit less verbose.

println!("origin: {origin:?}, size: {size:?}");

goes from:

origin Origin2D { x: 0, y: 0 }, size: Extent3D { width: 128, height: 128, depth_or_array_layers: 1 }

to:

origin: (0, 0), size: (128, 128, 1)

Checklist

  • Run cargo fmt.
  • Run cargo clippy.

@nical nical requested a review from a team as a code owner December 9, 2023 15:07
Copy link
Copy Markdown
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it! But you got a pretty consequential typo there!

Co-authored-by: Andreas Reich <r_andreas2@web.de>
@Wumpf Wumpf enabled auto-merge (squash) December 9, 2023 22:42
@Wumpf Wumpf merged commit af701fb into gfx-rs:trunk Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants