Skip to content

Commit

Permalink
cargo clippy --fix for Rust 1.84
Browse files Browse the repository at this point in the history
  • Loading branch information
cmackenzie1 committed Jan 9, 2025
1 parent 9f24b41 commit 9e55b78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions worker/src/d1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ pub trait D1Argument {
fn js_value(&self) -> impl AsRef<JsValue>;
}

impl<'a> D1Argument for D1Type<'a> {
impl D1Argument for D1Type<'_> {
fn js_value(&self) -> impl AsRef<JsValue> {
Into::<JsValue>::into(self)
}
}

impl<'a> D1Argument for D1PreparedArgument<'a> {
impl D1Argument for D1PreparedArgument<'_> {
fn js_value(&self) -> impl AsRef<JsValue> {
&self.js_value
}
Expand Down
8 changes: 4 additions & 4 deletions worker/src/r2/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct GetOptionsBuilder<'bucket> {
pub(crate) range: Option<Range>,
}

impl<'bucket> GetOptionsBuilder<'bucket> {
impl GetOptionsBuilder<'_> {
/// Specifies that the object should only be returned given satisfaction of certain conditions
/// in the [R2Conditional]. Refer to [Conditional operations](https://developers.cloudflare.com/r2/runtime-apis/#conditional-operations).
pub fn only_if(mut self, only_if: Conditional) -> Self {
Expand Down Expand Up @@ -174,7 +174,7 @@ pub struct PutOptionsBuilder<'bucket> {
pub(crate) checksum_algorithm: String,
}

impl<'bucket> PutOptionsBuilder<'bucket> {
impl PutOptionsBuilder<'_> {
/// Various HTTP headers associated with the object. Refer to [HttpMetadata].
pub fn http_metadata(mut self, metadata: HttpMetadata) -> Self {
self.http_metadata = Some(metadata);
Expand Down Expand Up @@ -265,7 +265,7 @@ pub struct CreateMultipartUploadOptionsBuilder<'bucket> {
pub(crate) custom_metadata: Option<HashMap<String, String>>,
}

impl<'bucket> CreateMultipartUploadOptionsBuilder<'bucket> {
impl CreateMultipartUploadOptionsBuilder<'_> {
/// Various HTTP headers associated with the object. Refer to [HttpMetadata].
pub fn http_metadata(mut self, metadata: HttpMetadata) -> Self {
self.http_metadata = Some(metadata);
Expand Down Expand Up @@ -362,7 +362,7 @@ pub struct ListOptionsBuilder<'bucket> {
pub(crate) include: Option<Vec<Include>>,
}

impl<'bucket> ListOptionsBuilder<'bucket> {
impl ListOptionsBuilder<'_> {
/// The number of results to return. Defaults to 1000, with a maximum of 1000.
pub fn limit(mut self, limit: u32) -> Self {
self.limit = Some(limit);
Expand Down
2 changes: 1 addition & 1 deletion worker/src/r2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ pub struct ObjectBody<'body> {
inner: &'body EdgeR2ObjectBody,
}

impl<'body> ObjectBody<'body> {
impl ObjectBody<'_> {
/// Reads the data in the [Object] via a [ByteStream].
pub fn stream(self) -> Result<ByteStream> {
if self.inner.body_used()? {
Expand Down

0 comments on commit 9e55b78

Please sign in to comment.