impl<'a> From<&'a BString> for Cow<'a, BStr>#187
impl<'a> From<&'a BString> for Cow<'a, BStr>#187BurntSushi merged 1 commit intoBurntSushi:masterfrom
impl<'a> From<&'a BString> for Cow<'a, BStr>#187Conversation
This commit simplifies code in situations like: ``` let mut v = Vec::<Cow<'a, BStr>>::new(); let s = BString::new(...); // Before this commit, we would have to do: // v.push(s.as_bstr().into()); v.push(s.into()); ```
BurntSushi
left a comment
There was a problem hiding this comment.
Makes sense to me, and lines up with the corresponding impl in std.
|
This PR is on crates.io in |
Yes, exactly, forgot to mention that. Huge thank you for releasing the crate so fast! Cheers |
|
I upgraded cargo to bstr 1.9.2 and it broke the build of gix Would this be considered
|
|
Uuuuuuuuuuggggggg. That's "incorrect" I'll yank |
|
OK, it has been yanked. But yes, I generally consider this an issue in |
|
I filed an issue with gix: GitoxideLabs/gitoxide#1466 |
|
Sorry @wbenny. Hopefully we can get this trait impl published soon, but given this was caught early and yanking in this specific case doesn't really have too much downside, I want to avoid creating an emergency for |
|
OK, let's try this again. This PR is on crates.io in |
This commit simplifies code in situations like: