-
Notifications
You must be signed in to change notification settings - Fork 182
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
Adding T: Bake
bound on ZeroVec
's Bake
#3451
Conversation
} | ||
Err(_) => { | ||
env.insert("zerovec"); | ||
let u24 = u32::from_le_bytes([self.0[0], self.0[1], self.0[2], 0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no bake
here intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somewhat, it's more code for the same result.
Not opposed. Bit worried about how we can manage this for VZV, if at all, but we don't need to. This is a breaking change in databake, though. I think it would be nice if we could mitigate that breakage for one release (let ICU4X's databake dep be a range dep for 1.3). Not blocking, and we can see what it looks like when we do a release. |
For VZV we'd probably want a The breaking in databake is in the other PR, no? |
This comment was marked as spam.
This comment was marked as spam.
Oh, no, it's breaking |
Meh, nobody uses the |
@@ -8,7 +8,7 @@ use databake::*; | |||
|
|||
impl<T> Bake for ZeroVec<'_, T> | |||
where | |||
T: AsULE + ?Sized, | |||
T: AsULE + ?Sized + Bake, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new bound is a breaking change in zerovec. I don't care too much about it though because it only comes up if someone is using both zerovec and databake at the same time, and (most importantly) zerovec is pre-1.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, though we need to figure out if we want to follow semver and release a breaking zerovec bump.
@@ -15,7 +16,33 @@ impl<const N: usize> Bake for TinyAsciiStr<N> { | |||
} | |||
} | |||
|
|||
impl<const N: usize> databake::Bake for UnvalidatedTinyAsciiStr<N> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Please mention these impls in the PR title.
Based on #3450
This bound is currently unused, but will be useful as part of #1935