diff options
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r-- | ext/fetch/lib.rs | 9 |
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 { |