-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,8 @@ pub use openvino_sys::{ | |
| pub use request::InferRequest; | ||
| pub use tensor_desc::TensorDesc; | ||
|
|
||
| /// # Panics | ||
| /// | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same "explain the panic" comment as below. |
||
| /// Emit the version string of the OpenVINO C API backing this implementation. | ||
| pub fn version() -> String { | ||
| use std::ffi::CStr; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,10 +31,10 @@ impl BumpCommand { | |
| .windows(2) | ||
| .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 commentThe reason will be displayed to describe this comment to others. Learn more. Can we just use |
||
| "Not all crate versions are the same: {:?}", | ||
| publishable_crates | ||
| ); | ||
| )); | ||
| } | ||
|
|
||
| // Change the version. Unless specified with a custom version, the `pre` and `build` | ||
|
|
@@ -70,7 +70,7 @@ impl BumpCommand { | |
| } | ||
|
|
||
| // Add a Git commit. | ||
| let commit_message = format!("Release v{}", next_version_str); | ||
| let commit_message = format!("Release v{next_version_str}"); | ||
| if self.git { | ||
| println!("> add Git commit: {}", &commit_message); | ||
| if !self.dry_run && self.git { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,10 +25,10 @@ impl PublishCommand { | |
| .windows(2) | ||
| .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 commentThe reason will be displayed to describe this comment to others. Learn more. Same |
||
| "Not all crate versions are the same: {:?}", | ||
| publishable_crates | ||
| ); | ||
| )); | ||
| } | ||
|
|
||
| // Check that all of the publishable crates are in `PUBLICATION_ORDER`. | ||
|
|
@@ -40,7 +40,7 @@ impl PublishCommand { | |
| // Publish each crate. | ||
| let crates_dir = path_to_crates()?; | ||
| for krate in PUBLICATION_ORDER { | ||
| println!("> publish {}", krate); | ||
| println!("> publish {krate}"); | ||
| if !self.dry_run { | ||
| let krate_dir = crates_dir.clone().join(krate); | ||
| let exec_result = exec( | ||
|
|
@@ -53,7 +53,7 @@ impl PublishCommand { | |
| // We want to continue even if a crate does not publish: this allows us to re-run | ||
| // the `publish` command if uploading one or more crates fails. | ||
| if let Err(e) = exec_result { | ||
| println!("Failed to publish crate {}, continuing:\n {}", krate, e); | ||
| println!("Failed to publish crate {krate}, continuing:\n {e}"); | ||
| } | ||
|
|
||
| // Hopefully this gives crates.io enough time for subsequent publications to work. | ||
|
|
@@ -64,7 +64,7 @@ impl PublishCommand { | |
| // Tag the repository. | ||
| let tag = format!("v{}", publishable_crates[0].version); | ||
| if self.git { | ||
| println!("> push Git tag: {}", tag); | ||
| println!("> push Git tag: {tag}"); | ||
| if !self.dry_run { | ||
| exec(Command::new("git").arg("tag").arg(&tag))?; | ||
| exec(Command::new("git").arg("push").arg("origin").arg(&tag))?; | ||
|
|
||
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:
They want us to describe the conditions under which this panics.