Skip to content

Commit

Permalink
fix: removed Error from function return
Browse files Browse the repository at this point in the history
Signed-off-by: Sayan Paul <[email protected]>
  • Loading branch information
Sayan Paul committed Nov 7, 2023
1 parent 489ada8 commit 3f0aed8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod handler;
use anyhow::{bail, Error, Result};
use anyhow::{bail, Result};
use clap::{Parser, Subcommand, ValueEnum};
use config::{Config, File, FileFormat};
use glob::glob;
Expand Down Expand Up @@ -107,7 +107,7 @@ enum Commands {
}

/// this runs all the scripts in required.d and wanted.d
fn run_diagnostics() -> Result<(), Error> {
fn run_diagnostics() -> Result<()> {
let mut script_failure: bool = false;
let mut path_exists: bool = false;
for path in GREENBOOT_INSTALL_PATHS {
Expand Down Expand Up @@ -147,7 +147,7 @@ fn run_diagnostics() -> Result<(), Error> {
}

/// runs the scripts in red.d when health-check fails
fn run_red() -> Result<(), Error> {
fn run_red() -> Result<()> {
for path in GREENBOOT_INSTALL_PATHS {
let red_path = format!("{path}/red.d/");
if let Some(e) = run_scripts("red", &red_path).err() {
Expand All @@ -158,7 +158,7 @@ fn run_red() -> Result<(), Error> {
}

/// runs the scripts green.d when health-check passes
fn run_green() -> Result<(), Error> {
fn run_green() -> Result<()> {
for path in GREENBOOT_INSTALL_PATHS {
let green_path = format!("{path}/green.d/");
if let Some(e) = run_scripts("green", &green_path).err() {
Expand Down

0 comments on commit 3f0aed8

Please sign in to comment.