Skip to content

Commit a2a64d6

Browse files
freddy77Andrii Sultanov
authored and
Andrii Sultanov
committed
CP-52225 - oxenstored: Use String.for_all to simplify name check
Signed-off-by: Frediano Ziglio <[email protected]>
1 parent 3c78c0e commit a2a64d6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

oxenstored/store.ml

+1-3
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,7 @@ module Path = struct
142142
|| c = '-'
143143
|| c = '@'
144144

145-
let name_is_valid name =
146-
name <> ""
147-
&& String.fold_left (fun accu c -> accu && char_is_valid c) true name
145+
let name_is_valid name = name <> "" && String.for_all char_is_valid name
148146

149147
let is_valid path = List.for_all name_is_valid path
150148

0 commit comments

Comments
 (0)