summaryrefslogtreecommitdiff
path: root/ext/fetch/lib.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-01-27 10:43:16 -0500
committerGitHub <noreply@github.com>2023-01-27 10:43:16 -0500
commitf5840bdcd360ec0bac2501f333e58e25742b1537 (patch)
tree7eb0818d2cafa0f6824e81b6ed2cfb609830971e /ext/fetch/lib.rs
parent1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff)
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r--ext/fetch/lib.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs
index 4a19650cb..7f0a5e37e 100644
--- a/ext/fetch/lib.rs
+++ b/ext/fetch/lib.rs
@@ -231,8 +231,7 @@ where
if method != Method::GET {
return Err(type_error(format!(
- "Fetching files only supports the GET method. Received {}.",
- method
+ "Fetching files only supports the GET method. Received {method}."
)));
}
@@ -347,11 +346,11 @@ where
}
"data" => {
let data_url = DataUrl::process(url.as_str())
- .map_err(|e| type_error(format!("{:?}", e)))?;
+ .map_err(|e| type_error(format!("{e:?}")))?;
let (body, _) = data_url
.decode_to_vec()
- .map_err(|e| type_error(format!("{:?}", e)))?;
+ .map_err(|e| type_error(format!("{e:?}")))?;
let response = http::Response::builder()
.status(http::StatusCode::OK)
@@ -371,7 +370,7 @@ where
// because the URL isn't an object URL.
return Err(type_error("Blob for the given URL not found."));
}
- _ => return Err(type_error(format!("scheme '{}' not supported", scheme))),
+ _ => return Err(type_error(format!("scheme '{scheme}' not supported"))),
};
Ok(FetchReturn {