add some more From impls + IntoCow#24
Merged
Merged
Conversation
154d403 to
595ae56
Compare
Member
Author
|
related to twitch-rs/twitch_api#280 |
8b78800 to
c25f8f5
Compare
0085dda to
7fbdaad
Compare
Emilgardis
commented
Oct 28, 2022
Comment on lines
+168
to
+195
| 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(_)) | ||
| } |
Member
Author
There was a problem hiding this comment.
@Nerixyz I think this solves the issue described in twitch-rs/twitch_api#280 (comment)
Contributor
There was a problem hiding this comment.
Yes this should solve it 👍
From impls + IntoCow
fb0b663 to
0cc5242
Compare
Member
Author
|
bors r+ |
Member
Author
|
bors r- |
Contributor
|
Canceled. |
0cc5242 to
9d870bd
Compare
Member
Author
|
bors r+ |
Contributor
|
Build failed: |
9d870bd to
c4f150a
Compare
Member
Author
|
bors r+ |
Contributor
|
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 |
Member
Author
|
@spikespaz can you please elaborate in a new issue. There shouldn't be any problems with this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.