From db8af8e4e5b3209a8b09c2b92dd6512d0ddeeea0 Mon Sep 17 00:00:00 2001 From: yihong0618 Date: Fri, 17 Jan 2025 14:17:09 +0800 Subject: [PATCH] fix: make clippy happy again Signed-off-by: yihong0618 --- core/src/services/onedrive/writer.rs | 2 +- core/src/services/vercel_blob/error.rs | 2 +- core/src/services/webdav/error.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/services/onedrive/writer.rs b/core/src/services/onedrive/writer.rs index f2a35d1e57dd..c6ed61f22c4f 100644 --- a/core/src/services/onedrive/writer.rs +++ b/core/src/services/onedrive/writer.rs @@ -122,7 +122,7 @@ impl OneDriveWriter { } async fn create_upload_session(&self) -> Result { - let file_name_from_path = self.path.split('/').last().ok_or_else(|| { + let file_name_from_path = self.path.split('/').next_back().ok_or_else(|| { Error::new( ErrorKind::Unexpected, "connection string must have AccountName", diff --git a/core/src/services/vercel_blob/error.rs b/core/src/services/vercel_blob/error.rs index f694788867b0..58f9420a1ac5 100644 --- a/core/src/services/vercel_blob/error.rs +++ b/core/src/services/vercel_blob/error.rs @@ -39,7 +39,7 @@ struct VercelBlobErrorDetail { /// Parse error response into Error. pub(super) fn parse_error(resp: Response) -> Error { - let (parts, mut body) = resp.into_parts(); + let (parts, body) = resp.into_parts(); let bs = body.to_bytes(); let (kind, retryable) = match parts.status.as_u16() { diff --git a/core/src/services/webdav/error.rs b/core/src/services/webdav/error.rs index cf8c1670f5a7..bc3f2f4b3bfd 100644 --- a/core/src/services/webdav/error.rs +++ b/core/src/services/webdav/error.rs @@ -15,7 +15,6 @@ // specific language governing permissions and limitations // under the License. -use bytes::Buf; use http::Response; use http::StatusCode;