Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Add fmt::Pointer impl for bevy_ptr::{Ptr, PtrMut, OwnedPtr} #6980

Closed
wants to merge 1 commit into from

Conversation

MrGunflame
Copy link
Contributor

Objective

  • bevy_ptr::{Ptr, PtrMut, OwnedPtr} wrap raw pointers and should be printable using pointer formatting.

Solution

  • Add a core::fmt::Pointer impl for Ptr, PtrMut and OwnedPtr based on the wrapped NonNull pointer.

Changelog

  • Added a core::fmt::Pointer impl to Ptr, PtrMut and OwnedPtr.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Dec 18, 2022
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Cool: I had no idea that https://doc.rust-lang.org/std/fmt/trait.Pointer.html existed.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 18, 2022
@james7132 james7132 added this to the 0.10 milestone Dec 19, 2022
@cart
Copy link
Member

cart commented Dec 20, 2022

bors r+

bors bot pushed a commit that referenced this pull request Dec 20, 2022
# Objective

- `bevy_ptr::{Ptr, PtrMut, OwnedPtr}` wrap raw pointers and should be printable using pointer formatting.

## Solution

- Add a `core::fmt::Pointer` impl for `Ptr`, `PtrMut` and `OwnedPtr` based on the wrapped `NonNull` pointer.

---

## Changelog

- Added a `core::fmt::Pointer` impl to `Ptr`, `PtrMut` and `OwnedPtr`.

Co-authored-by: MrGunflame <[email protected]>
@bors bors bot changed the title Add fmt::Pointer impl for bevy_ptr::{Ptr, PtrMut, OwnedPtr} [Merged by Bors] - Add fmt::Pointer impl for bevy_ptr::{Ptr, PtrMut, OwnedPtr} Dec 20, 2022
@bors bors bot closed this Dec 20, 2022
alradish pushed a commit to alradish/bevy that referenced this pull request Jan 22, 2023
…ne#6980)

# Objective

- `bevy_ptr::{Ptr, PtrMut, OwnedPtr}` wrap raw pointers and should be printable using pointer formatting.

## Solution

- Add a `core::fmt::Pointer` impl for `Ptr`, `PtrMut` and `OwnedPtr` based on the wrapped `NonNull` pointer.

---

## Changelog

- Added a `core::fmt::Pointer` impl to `Ptr`, `PtrMut` and `OwnedPtr`.

Co-authored-by: MrGunflame <[email protected]>
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
…ne#6980)

# Objective

- `bevy_ptr::{Ptr, PtrMut, OwnedPtr}` wrap raw pointers and should be printable using pointer formatting.

## Solution

- Add a `core::fmt::Pointer` impl for `Ptr`, `PtrMut` and `OwnedPtr` based on the wrapped `NonNull` pointer.

---

## Changelog

- Added a `core::fmt::Pointer` impl to `Ptr`, `PtrMut` and `OwnedPtr`.

Co-authored-by: MrGunflame <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants