-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix formatting and clippy errors #3
Conversation
c6b54d3
to
4e86fb8
Compare
Signed-off-by: Jim Crossley <jim@crossleys.org>
Add nettle dep, caching and rename job Signed-off-by: Jim Crossley <jim@crossleys.org>
Also reorganized a few tests beneath a single `tests` module Signed-off-by: Jim Crossley <jim@crossleys.org>
#[cfg(test)] | ||
mod tests { |
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.
@bobmcwhirter This looks like more changes than it is. I just moved all the tests beneath a single tests
module.
// impl From<&&str> for Purl { | ||
// fn from(value: &&str) -> Self { | ||
// PackageUrl::from_str(value).unwrap().into() | ||
// } | ||
// } |
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.
@bobmcwhirter I thought this looked weird. It's not used, but I forgot to delete it.
@@ -128,15 +128,18 @@ impl Debug for Purl { | |||
|
|||
impl From<&str> for Purl { | |||
fn from(value: &str) -> Self { | |||
PackageUrl::from_str(value).unwrap().into() |
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.
@bobmcwhirter We're using a clippy rule that doesn't like unwrap
. We only allow them for tests. I don't know if deriving Default
is The Right Thing in this case or not, but seemed harmless.
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.
I think the answer is TryFrom instead since failure is an option.
More work toward #1