From 7b302b87f297604fc733edcdffb1e8662eb71f02 Mon Sep 17 00:00:00 2001
From: David Phillips <david@yeah.nah.nz>
Date: Sun, 12 Jul 2020 13:25:08 +1200
Subject: Timezone: flatten single-statemnt `do` blocks

---
 Plugin/Timezone.pm | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

(limited to 'Plugin')

diff --git a/Plugin/Timezone.pm b/Plugin/Timezone.pm
index f3386b2..c56a984 100644
--- a/Plugin/Timezone.pm
+++ b/Plugin/Timezone.pm
@@ -65,9 +65,7 @@ sub time {
 		$d->set_time_zone($tz);
 		my $timestr = $d->strftime("%H:%M on %a %d %b, %Y (%Z)");
 		return clock_message($nick, $tz, $timestr);
-	} or do {
-		return "$requester: ".make_unknown_zone_message $nick;
-	}
+	} or return "$requester: ".make_unknown_zone_message $nick;
 }
 
 sub zone_convert {
@@ -102,9 +100,6 @@ sub zone_convert {
 		my $from_message = clock_message($from_arg, $from_tz, $unconverted);
 		my $to_message = clock_message($to_arg, $to_tz, $converted);
 		return "$to_message when $from_message";
-	} or do {
-		return "$requester: I can't figure this time conversion out";
-	}
-
+	} or return "$requester: I can't figure this time conversion out";
 }
 1;
-- 
cgit v1.1