mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
clippy
This commit is contained in:
parent
52b71cd85f
commit
7356809fc3
2 changed files with 3 additions and 2 deletions
|
@ -43,6 +43,7 @@ fn load<'a>(
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Load using only a single thread; used when compiling to webassembly
|
/// Load using only a single thread; used when compiling to webassembly
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
pub fn load_single_threaded<'a>(
|
pub fn load_single_threaded<'a>(
|
||||||
arena: &'a Bump,
|
arena: &'a Bump,
|
||||||
load_start: LoadStart<'a>,
|
load_start: LoadStart<'a>,
|
||||||
|
|
|
@ -176,10 +176,10 @@ impl Encoding {
|
||||||
"" => {
|
"" => {
|
||||||
// There was no Content-Encoding header, but we can infer the encoding
|
// There was no Content-Encoding header, but we can infer the encoding
|
||||||
// from the file extension in the URL.
|
// from the file extension in the URL.
|
||||||
let end_of_ext = url.rfind('#').unwrap_or_else(|| url.len());
|
let end_of_ext = url.rfind('#').unwrap_or(url.len());
|
||||||
|
|
||||||
// Drop the URL fragment when determining file extension
|
// Drop the URL fragment when determining file extension
|
||||||
match url[0..end_of_ext].rsplit_once(".") {
|
match url[0..end_of_ext].rsplit_once('.') {
|
||||||
Some((_, after_dot)) => match Compression::from_file_ext(after_dot) {
|
Some((_, after_dot)) => match Compression::from_file_ext(after_dot) {
|
||||||
Some(Compression::Brotli) => Ok(Self::Brotli),
|
Some(Compression::Brotli) => Ok(Self::Brotli),
|
||||||
Some(Compression::Gzip) => Ok(Self::Gzip),
|
Some(Compression::Gzip) => Ok(Self::Gzip),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue