aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2023-11-27 18:53:41 +0000
committerLouis Pilfold <louis@lpil.uk>2023-11-27 18:53:56 +0000
commite08a63ec151aef0b7b4fbb38f4c8a4347e853616 (patch)
treec9a1043726e3bef6ba5c44fbf9b67fd7e8b2feb8
parenta7dec79942853e926b7fecbe0207f0f71ec04390 (diff)
downloadgleam_stdlib-e08a63ec151aef0b7b4fbb38f4c8a4347e853616.tar.gz
gleam_stdlib-e08a63ec151aef0b7b4fbb38f4c8a4347e853616.zip
Fix inexhaustive cases
-rw-r--r--src/gleam/list.gleam2
-rw-r--r--src/gleam/string.gleam2
-rw-r--r--src/gleam/uri.gleam4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index af206c9..ff8eb7d 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -1188,6 +1188,7 @@ fn merge_up(
order.Gt -> merge_up(na, nb - 1, a, br, [bx, ..acc], compare)
_ -> merge_up(na - 1, nb, ar, b, [ax, ..acc], compare)
}
+ _, _, _, _ -> acc
}
}
@@ -1211,6 +1212,7 @@ fn merge_down(
order.Lt -> merge_down(na - 1, nb, ar, b, [ax, ..acc], compare)
_ -> merge_down(na, nb - 1, a, br, [bx, ..acc], compare)
}
+ _, _, _, _ -> acc
}
}
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index 2c8912f..d4496f3 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -728,7 +728,7 @@ fn do_to_utf_codepoints_impl(
case bit_array {
<<first:utf8_codepoint, rest:bytes>> ->
do_to_utf_codepoints_impl(rest, [first, ..acc])
- <<>> -> acc
+ _ -> acc
}
}
diff --git a/src/gleam/uri.gleam b/src/gleam/uri.gleam
index 3d817eb..11f6ea6 100644
--- a/src/gleam/uri.gleam
+++ b/src/gleam/uri.gleam
@@ -351,7 +351,7 @@ pub fn to_string(uri: Uri) -> String {
Some(s), None, Some(h) -> [s, "://", h, ..parts]
Some(s), Some(_), None | Some(s), None, None -> [s, ":", ..parts]
None, None, Some(h) -> ["//", h, ..parts]
- None, Some(_), None | None, None, None -> parts
+ _, _, _ -> parts
}
string.concat(parts)
}
@@ -426,7 +426,7 @@ pub fn merge(base: Uri, relative: Uri) -> Result(Uri, Nil) {
)
Ok(resolved)
}
- Uri(scheme: None, host: None, ..) -> {
+ _ -> {
let #(new_path, new_query) = case relative.path {
"" -> #(base.path, option.or(relative.query, base.query))
_ -> {