-
Notifications
You must be signed in to change notification settings - Fork 28
fix: clippy warnings #74
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
Conversation
Signed-off-by: stevelr <[email protected]>
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.
@stevelr, thanks for fixing this stuff. Just a couple of nits below...
| pub use tensor_desc::TensorDesc; | ||
|
|
||
| /// # Panics | ||
| /// |
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.
Same "explain the panic" comment as below.
| .all(|w| w[0].version == w[1].version) | ||
| { | ||
| anyhow!( | ||
| return Err(anyhow!( |
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.
Can we just use bail! here? I haven't been too worried about xtask since it is essentially repo-internal scripts, but thanks for fixing this!
| .all(|w| w[0].version == w[1].version) | ||
| { | ||
| anyhow!( | ||
| return Err(anyhow!( |
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.
Same bail! comment as above.
| } | ||
|
|
||
| /// # Panics | ||
| /// |
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 clippy is looking for something like:
/// Find the path...
///
/// # Panics
/// This function panics if it fails to find and load an OpenVINO library.
They want us to describe the conditions under which this panics.
fix: clippy warnings and missing error return
A couple of these looked like actual bugs, where an
anyhow!error was generated but not returned