Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauthamastro committed Dec 20, 2023
1 parent f7d040e commit 5f0f730
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pallets/ocex/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,11 @@ impl<T: Config> Pallet<T> {
/// Checks if another worker is already running or not
pub fn check_worker_status() -> Result<bool, &'static str> {
let s_info = StorageValueRef::persistent(&WORKER_STATUS);
match s_info.get::<bool>().map_err(|err| {
let handle_err = |err| {
log::error!(target:"ocex","Error while loading worker status: {:?}",err);
"Unable to load worker status"
})? {
};
match s_info.get::<bool>().map_err(handle_err)? {
Some(true) => {
// Another worker is online, so exit
log::info!(target:"ocex", "Another worker is online, so exit");
Expand Down

0 comments on commit 5f0f730

Please sign in to comment.