Skip to content

Commit e08a63e

Browse files
committed
Fix inexhaustive cases
1 parent a7dec79 commit e08a63e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/gleam/list.gleam

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,7 @@ fn merge_up(
11881188
order.Gt -> merge_up(na, nb - 1, a, br, [bx, ..acc], compare)
11891189
_ -> merge_up(na - 1, nb, ar, b, [ax, ..acc], compare)
11901190
}
1191+
_, _, _, _ -> acc
11911192
}
11921193
}
11931194

@@ -1211,6 +1212,7 @@ fn merge_down(
12111212
order.Lt -> merge_down(na - 1, nb, ar, b, [ax, ..acc], compare)
12121213
_ -> merge_down(na, nb - 1, a, br, [bx, ..acc], compare)
12131214
}
1215+
_, _, _, _ -> acc
12141216
}
12151217
}
12161218

src/gleam/string.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ fn do_to_utf_codepoints_impl(
728728
case bit_array {
729729
<<first:utf8_codepoint, rest:bytes>> ->
730730
do_to_utf_codepoints_impl(rest, [first, ..acc])
731-
<<>> -> acc
731+
_ -> acc
732732
}
733733
}
734734

src/gleam/uri.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ pub fn to_string(uri: Uri) -> String {
351351
Some(s), None, Some(h) -> [s, "://", h, ..parts]
352352
Some(s), Some(_), None | Some(s), None, None -> [s, ":", ..parts]
353353
None, None, Some(h) -> ["//", h, ..parts]
354-
None, Some(_), None | None, None, None -> parts
354+
_, _, _ -> parts
355355
}
356356
string.concat(parts)
357357
}
@@ -426,7 +426,7 @@ pub fn merge(base: Uri, relative: Uri) -> Result(Uri, Nil) {
426426
)
427427
Ok(resolved)
428428
}
429-
Uri(scheme: None, host: None, ..) -> {
429+
_ -> {
430430
let #(new_path, new_query) = case relative.path {
431431
"" -> #(base.path, option.or(relative.query, base.query))
432432
_ -> {

0 commit comments

Comments
 (0)