Lokathor/bytemuck

[Breaking] Change definition of TransparentWrapper

Closed this issue · 2 comments

Soveu commented

Because it does not make sense to implement many TransparentWrappers for one struct I suggest changing the definition to

pub unsafe trait TransparentWrapper {
    type Wrapped: ?Sized;

    fn wrap_ref(s: &Wrapped) -> &Self { ... }
    fn wrap_mut(s: &mut Wrapped) -> &mut Self { ... }
}

Well, I don't see what advantage that gives though.

@Soveu i'm going to close this in a while if you can't explain what you meant or why this breaking change would be an improvement.