Skip to content

Commit 1f96524

Browse files
committed
no need to catch Exception in nth
1 parent 0de5053 commit 1f96524

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

src/xitdb/array_list.clj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@
4444
(common/-read-from-cursor cursor)))
4545

4646
(nth [_ i not-found]
47-
(try
48-
(let [cursor (.getCursor ral (long i))]
49-
(if cursor
50-
(common/-read-from-cursor cursor)
51-
not-found))
52-
(catch Exception _
47+
(let [cursor (.getCursor ral (long i))]
48+
(if cursor
49+
(common/-read-from-cursor cursor)
5350
not-found)))
5451

5552
clojure.lang.ILookup

src/xitdb/linked_list.clj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@
3838
(common/-read-from-cursor cursor)))
3939

4040
(nth [_ i not-found]
41-
(try
42-
(let [cursor (.getCursor rlal (long i))]
43-
(if cursor
44-
(common/-read-from-cursor cursor)
45-
not-found))
46-
(catch Exception _
41+
(let [cursor (.getCursor rlal (long i))]
42+
(if cursor
43+
(common/-read-from-cursor cursor)
4744
not-found)))
4845

4946
clojure.lang.ILookup

0 commit comments

Comments
 (0)