-
Notifications
You must be signed in to change notification settings - Fork 3
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
add some more From
impls + IntoCow
#24
Conversation
154d403
to
595ae56
Compare
related to twitch-rs/twitch_api#280 |
8b78800
to
c25f8f5
Compare
0085dda
to
7fbdaad
Compare
pub fn broadcaster_id<'a>(broadcaster_id: impl IntoCow<'a, UserIdRef> + 'a) -> bool { | ||
struct K<'a> { | ||
id: std::borrow::Cow<'a, UserIdRef>, | ||
} | ||
let k = K { | ||
id: broadcaster_id.to_cow(), | ||
}; | ||
matches!(k.id, std::borrow::Cow::Borrowed(_)) | ||
} |
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.
@Nerixyz I think this solves the issue described in twitch-rs/twitch_api#280 (comment)
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 this should solve it 👍
From
impls + IntoCow
fb0b663
to
0cc5242
Compare
bors r+ |
24: add some more `From` impls + `IntoCow` r=Emilgardis a=Emilgardis Co-authored-by: Emil Gardström <[email protected]>
bors r- |
Canceled. |
0cc5242
to
9d870bd
Compare
bors r+ |
24: add some more `From` impls + `IntoCow` r=Emilgardis a=Emilgardis Co-authored-by: Emil Gardström <[email protected]>
Build failed: |
9d870bd
to
c4f150a
Compare
bors r+ |
Build succeeded:
|
Isn't this an antipattern? The implementation isn't complete and is causing build errors. Can't we expect the API user to wrap the types in |
@spikespaz can you please elaborate in a new issue. There shouldn't be any problems with this. |
No description provided.