Skip to content

Commit 2bf7601

Browse files
committed
csv catch warning fix
1 parent b97f005 commit 2bf7601

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

std/csv.d

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,14 +1118,12 @@ public:
11181118
// @system due to the catch for Throwable
11191119
@system pure unittest
11201120
{
1121+
import std.exception : assertNotThrown;
11211122
enum failData =
11221123
"name, surname, age
11231124
Joe, Joker, 99\r";
1124-
bool pass = true;
11251125
auto r = csvReader(failData);
1126-
try foreach (entry; r){}
1127-
catch pass = false;
1128-
assert(pass);
1126+
assertNotThrown((){foreach (entry; r){}}());
11291127
}
11301128

11311129
/*

0 commit comments

Comments
 (0)