forked from the-distro/ofborg
Clippy: redundant pattern matching, consider using is_err
This commit is contained in:
parent
48d2815c1a
commit
a9e2c02c8c
|
@ -92,7 +92,7 @@ pub mod ofborg {
|
|||
}
|
||||
|
||||
pub fn setup_log() {
|
||||
if let Err(_) = env::var("RUST_LOG") {
|
||||
if env::var("RUST_LOG").is_err() {
|
||||
env::set_var("RUST_LOG", "info");
|
||||
env_logger::init().unwrap();
|
||||
info!("Defaulting RUST_LOG environment variable to info");
|
||||
|
|
|
@ -333,7 +333,7 @@ impl notifyworker::SimpleNotifyWorker for BuildWorker {
|
|||
return;
|
||||
}
|
||||
|
||||
if let Err(_) = co.merge_commit(job.pr.head_sha.as_ref()) {
|
||||
if co.merge_commit(job.pr.head_sha.as_ref()).is_err() {
|
||||
info!("Failed to merge {}", job.pr.head_sha);
|
||||
actions.merge_failed();
|
||||
return;
|
||||
|
|
|
@ -262,7 +262,7 @@ impl<E: stats::SysEvents + 'static> worker::SimpleWorker for MassRebuildWorker<E
|
|||
|
||||
overall_status.set_with_description("Merging PR", hubcaps::statuses::State::Pending);
|
||||
|
||||
if let Err(_) = co.merge_commit(job.pr.head_sha.as_ref()) {
|
||||
if co.merge_commit(job.pr.head_sha.as_ref()).is_err() {
|
||||
overall_status.set_with_description(
|
||||
"Failed to merge",
|
||||
hubcaps::statuses::State::Failure,
|
||||
|
|
Loading…
Reference in a new issue