From f5840bdcd360ec0bac2501f333e58e25742b1537 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 27 Jan 2023 10:43:16 -0500 Subject: chore: upgrade to Rust 1.67 (#17548) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- ext/fetch/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'ext/fetch') 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 { -- cgit v1.2.3