From 63c4d7ee1a2f13c5adddfa47dc1d21e46febd423 Mon Sep 17 00:00:00 2001 From: Luke Seelenbinder Date: Tue, 17 Sep 2024 19:28:59 +0300 Subject: [PATCH] Fix lint. --- src/backend_s3.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/backend_s3.rs b/src/backend_s3.rs index a6b6e01..e319ffd 100644 --- a/src/backend_s3.rs +++ b/src/backend_s3.rs @@ -1,10 +1,12 @@ use bytes::Bytes; use s3::Bucket; -use crate::async_reader::{AsyncBackend, AsyncPmTilesReader}; -use crate::cache::{DirectoryCache, NoCache}; -use crate::error::PmtError::{ResponseBodyTooLong, UnexpectedNumberOfBytesReturned}; -use crate::PmtResult; +use crate::{ + async_reader::{AsyncBackend, AsyncPmTilesReader}, + cache::{DirectoryCache, NoCache}, + error::PmtError::ResponseBodyTooLong, + PmtResult, +}; impl AsyncPmTilesReader { /// Creates a new `PMTiles` reader from a bucket and path to the @@ -61,7 +63,7 @@ impl AsyncBackend for S3Backend { if response_bytes.len() > length { Err(ResponseBodyTooLong(response_bytes.len(), length)) } else { - Ok(response_bytes) + Ok(response_bytes.clone()) } } }