Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
implement some clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
decathorpe committed Sep 25, 2021
1 parent 2d59526 commit 0e9b2f4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "bodhi-cli"
description = "bodhi CLI client based on bodhi-rs"
license = "MIT OR Apache-2.0"

version = "1.0.2"
version = "1.1.0-dev"
edition = "2018"

authors = ["Fabio Valentini <[email protected]>"]
Expand All @@ -18,7 +18,7 @@ name = "bodhi-cli"
path = "src/main.rs"

[dependencies]
bodhi = "^1.0"
bodhi = "^1.1"
chrono = "^0.4.10"
dirs = "^3.0.1"
rpassword = "^5.0.0"
Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn get_store_password(clear: bool) -> Result<String, String> {
if let Err(error) = collection.create_item(
"bodhi-cli",
attributes.clone(),
&password.as_bytes(),
password.as_bytes(),
replace,
"password",
) {
Expand Down Expand Up @@ -249,8 +249,8 @@ fn main() -> Result<(), String> {

let mut builder = match (&builds, &from_tag) {
(Some(_), Some(_)) => unreachable!(),
(Some(builds), None) => UpdateBuilder::from_builds(&builds, &notes),
(None, Some(tag)) => UpdateBuilder::from_tag(&tag, &notes),
(Some(builds), None) => UpdateBuilder::from_builds(builds, &notes),
(None, Some(tag)) => UpdateBuilder::from_tag(tag, &notes),
(None, None) => return Err(String::from("Neither builds nor koji tag specified.")),
};

Expand Down Expand Up @@ -411,7 +411,7 @@ fn main() -> Result<(), String> {

let requirements = requirements.as_ref().map(|reqs| reqs.join(","));
if let Some(requirements) = &requirements {
editor = editor.requirements(&requirements);
editor = editor.requirements(requirements);
}

if let Some(severity) = severity {
Expand Down
4 changes: 2 additions & 2 deletions src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bodhi::Update;
use bodhi::UpdateIDQuery;

pub fn query_override(bodhi: &BodhiService, nvr: &str) -> Result<Override, String> {
match bodhi.query(OverrideNVRQuery::new(&nvr)) {
match bodhi.query(OverrideNVRQuery::new(nvr)) {
Ok(value) => match value {
Some(over_ride) => Ok(over_ride),
None => Err(format!("No override found for NVR: {}", nvr)),
Expand All @@ -15,7 +15,7 @@ pub fn query_override(bodhi: &BodhiService, nvr: &str) -> Result<Override, Strin
}

pub fn query_update(bodhi: &BodhiService, alias: &str) -> Result<Update, String> {
match bodhi.query(UpdateIDQuery::new(&alias)) {
match bodhi.query(UpdateIDQuery::new(alias)) {
Ok(value) => match value {
Some(update) => Ok(update),
None => Err(format!("No update found with this alias: {}", alias)),
Expand Down

0 comments on commit 0e9b2f4

Please sign in to comment.