Skip to content

Commit c4918c2

Browse files
committed
Add back explicit lifetimes to make my local version of clippy happy
clippy was the reason I changed this in the first place... :rollseyes:
1 parent b662dcf commit c4918c2

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/api/blobs.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Blobs {
127127
.await
128128
}
129129

130-
pub fn add_slice(&self, data: impl AsRef<[u8]>) -> AddProgress {
130+
pub fn add_slice(&self, data: impl AsRef<[u8]>) -> AddProgress<'_> {
131131
let options = ImportBytesRequest {
132132
data: Bytes::copy_from_slice(data.as_ref()),
133133
format: crate::BlobFormat::Raw,
@@ -136,7 +136,7 @@ impl Blobs {
136136
self.add_bytes_impl(options)
137137
}
138138

139-
pub fn add_bytes(&self, data: impl Into<bytes::Bytes>) -> AddProgress {
139+
pub fn add_bytes(&self, data: impl Into<bytes::Bytes>) -> AddProgress<'_> {
140140
let options = ImportBytesRequest {
141141
data: data.into(),
142142
format: crate::BlobFormat::Raw,
@@ -145,7 +145,7 @@ impl Blobs {
145145
self.add_bytes_impl(options)
146146
}
147147

148-
pub fn add_bytes_with_opts(&self, options: impl Into<AddBytesOptions>) -> AddProgress {
148+
pub fn add_bytes_with_opts(&self, options: impl Into<AddBytesOptions>) -> AddProgress<'_> {
149149
let options = options.into();
150150
let request = ImportBytesRequest {
151151
data: options.data,
@@ -155,7 +155,7 @@ impl Blobs {
155155
self.add_bytes_impl(request)
156156
}
157157

158-
fn add_bytes_impl(&self, options: ImportBytesRequest) -> AddProgress {
158+
fn add_bytes_impl(&self, options: ImportBytesRequest) -> AddProgress<'_> {
159159
trace!("{options:?}");
160160
let this = self.clone();
161161
let stream = Gen::new(|co| async move {
@@ -180,7 +180,7 @@ impl Blobs {
180180
AddProgress::new(self, stream)
181181
}
182182

183-
pub fn add_path_with_opts(&self, options: impl Into<AddPathOptions>) -> AddProgress {
183+
pub fn add_path_with_opts(&self, options: impl Into<AddPathOptions>) -> AddProgress<'_> {
184184
let options = options.into();
185185
self.add_path_with_opts_impl(ImportPathRequest {
186186
path: options.path,
@@ -190,7 +190,7 @@ impl Blobs {
190190
})
191191
}
192192

193-
fn add_path_with_opts_impl(&self, options: ImportPathRequest) -> AddProgress {
193+
fn add_path_with_opts_impl(&self, options: ImportPathRequest) -> AddProgress<'_> {
194194
trace!("{:?}", options);
195195
let client = self.client.clone();
196196
let stream = Gen::new(|co| async move {
@@ -215,7 +215,7 @@ impl Blobs {
215215
AddProgress::new(self, stream)
216216
}
217217

218-
pub fn add_path(&self, path: impl AsRef<Path>) -> AddProgress {
218+
pub fn add_path(&self, path: impl AsRef<Path>) -> AddProgress<'_> {
219219
self.add_path_with_opts(AddPathOptions {
220220
path: path.as_ref().to_owned(),
221221
mode: ImportMode::Copy,
@@ -226,7 +226,7 @@ impl Blobs {
226226
pub async fn add_stream(
227227
&self,
228228
data: impl Stream<Item = io::Result<Bytes>> + Send + Sync + 'static,
229-
) -> AddProgress {
229+
) -> AddProgress<'_> {
230230
let inner = ImportByteStreamRequest {
231231
format: crate::BlobFormat::Raw,
232232
scope: Scope::default(),
@@ -521,7 +521,7 @@ pub struct Batch<'a> {
521521
}
522522

523523
impl<'a> Batch<'a> {
524-
pub fn add_bytes(&self, data: impl Into<Bytes>) -> BatchAddProgress {
524+
pub fn add_bytes(&self, data: impl Into<Bytes>) -> BatchAddProgress<'_> {
525525
let options = ImportBytesRequest {
526526
data: data.into(),
527527
format: crate::BlobFormat::Raw,
@@ -530,7 +530,7 @@ impl<'a> Batch<'a> {
530530
BatchAddProgress(self.blobs.add_bytes_impl(options))
531531
}
532532

533-
pub fn add_bytes_with_opts(&self, options: impl Into<AddBytesOptions>) -> BatchAddProgress {
533+
pub fn add_bytes_with_opts(&self, options: impl Into<AddBytesOptions>) -> BatchAddProgress<'_> {
534534
let options = options.into();
535535
BatchAddProgress(self.blobs.add_bytes_impl(ImportBytesRequest {
536536
data: options.data,
@@ -539,7 +539,7 @@ impl<'a> Batch<'a> {
539539
}))
540540
}
541541

542-
pub fn add_slice(&self, data: impl AsRef<[u8]>) -> BatchAddProgress {
542+
pub fn add_slice(&self, data: impl AsRef<[u8]>) -> BatchAddProgress<'_> {
543543
let options = ImportBytesRequest {
544544
data: Bytes::copy_from_slice(data.as_ref()),
545545
format: crate::BlobFormat::Raw,
@@ -548,7 +548,7 @@ impl<'a> Batch<'a> {
548548
BatchAddProgress(self.blobs.add_bytes_impl(options))
549549
}
550550

551-
pub fn add_path_with_opts(&self, options: impl Into<AddPathOptions>) -> BatchAddProgress {
551+
pub fn add_path_with_opts(&self, options: impl Into<AddPathOptions>) -> BatchAddProgress<'_> {
552552
let options = options.into();
553553
BatchAddProgress(self.blobs.add_path_with_opts_impl(ImportPathRequest {
554554
path: options.path,

0 commit comments

Comments
 (0)