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

Make Mapper trait object safe by adding Self: Sized bounds on generic functions #84

Merged
merged 2 commits into from
Dec 10, 2019

Conversation

phil-opp
Copy link
Member

@phil-opp phil-opp commented Jul 8, 2019

See #80 for more information

I'm not quite sure whether this is a breaking change, but I think it is.

@phil-opp
Copy link
Member Author

phil-opp commented Dec 5, 2019

There were no objections in the last months, so I think we can merge this.

bors r+

bors bot added a commit that referenced this pull request Dec 5, 2019
84: Make Mapper trait object safe by adding `Self: Sized` bounds on generic functions r=phil-opp a=phil-opp

See #80 for more information

I'm not quite sure whether this is a **breaking change**, but I think it is.

89: Add new UnsafePhysFrame type and use it in Mapper::map_to r=phil-opp a=phil-opp

Fixes #88 

This pull request adds a new `UnsafePhysFrame` type that wraps a `PhysFrame`. The type is unsafe to construct and the caller must guarantee that the frame is not mapped already. This type allows to make the `map_to` and `identity_map` methods of the `Mapper` trait safe. This PR also adjust the `FrameAllocator` to use the new type.

This is a **breaking change**.



Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
bors bot added a commit that referenced this pull request Dec 5, 2019
84: Make Mapper trait object safe by adding `Self: Sized` bounds on generic functions r=phil-opp a=phil-opp

See #80 for more information

I'm not quite sure whether this is a **breaking change**, but I think it is.

89: Add new UnsafePhysFrame type and use it in Mapper::map_to r=phil-opp a=phil-opp

Fixes #88 

This pull request adds a new `UnsafePhysFrame` type that wraps a `PhysFrame`. The type is unsafe to construct and the caller must guarantee that the frame is not mapped already. This type allows to make the `map_to` and `identity_map` methods of the `Mapper` trait safe. This PR also adjust the `FrameAllocator` to use the new type.

This is a **breaking change**.



Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
@bors
Copy link
Contributor

bors bot commented Dec 5, 2019

Timed out (retrying...)

bors bot added a commit that referenced this pull request Dec 5, 2019
84: Make Mapper trait object safe by adding `Self: Sized` bounds on generic functions r=phil-opp a=phil-opp

See #80 for more information

I'm not quite sure whether this is a **breaking change**, but I think it is.

Co-authored-by: Philipp Oppermann <dev@phil-opp.com>
@phil-opp
Copy link
Member Author

phil-opp commented Dec 5, 2019

Seems like we have some problems with bors

bors r-

@bors
Copy link
Contributor

bors bot commented Dec 5, 2019

Canceled

phil-opp added a commit that referenced this pull request Dec 10, 2019
phil-opp added a commit that referenced this pull request Dec 10, 2019
@phil-opp phil-opp merged commit 3299189 into master Dec 10, 2019
@phil-opp phil-opp deleted the mapper-object-safety branch December 10, 2019 14:03
phil-opp added a commit that referenced this pull request Dec 13, 2019
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.

1 participant