-
Notifications
You must be signed in to change notification settings - Fork 96
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
Replace CslStringList
From
implementation with TryFrom
#362
Conversation
c69c516
to
21efc75
Compare
r? @metasim |
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.
Looks like 1.67 came with new clippy lints...
/// | ||
/// assert_eq!(count_opts(()), 0); | ||
/// ``` | ||
impl From<()> for CslStringList { |
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.
😢
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 isn't so bad, is it? I mean, it's from(&[])
vs. from(())
..
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.
Nah, I'm just being silly. I was bothered by the verbosity of src.make_valid(&CslStringList::new())
(vs. src.make_valid(())
), but fell into being overly clever and not really common/idiomatic. I understand why you got rid of it.
bors d+ |
✌️ lnicola can now approve this pull request. To approve and merge a pull request, simply reply with |
There's another PR for the lints. |
21efc75
to
a68aba7
Compare
Rebased over #363. |
bors d=metasim |
✌️ metasim can now approve this pull request. To approve and merge a pull request, simply reply with |
bors r=metasim |
Build succeeded: |
CHANGES.md
if knowledge of this change could be valuable to users.This isn't that ugly, and I think it's better than panicking in a
From
implementation.