Skip to content

Commit fe5951e

Browse files
ref: Fix new Clippy lints
1 parent 26c6352 commit fe5951e

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

src/api/data_types/deploy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct Deploy<'d> {
1818
pub projects: Option<Vec<Cow<'d, str>>>,
1919
}
2020

21-
impl<'d> Deploy<'d> {
21+
impl Deploy<'_> {
2222
/// Returns the name of this deploy, defaulting to `"unnamed"`.
2323
pub fn name(&self) -> &str {
2424
match self.name.as_deref() {

src/api/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ impl<'a> AuthenticatedApi<'a> {
13901390
}
13911391
}
13921392

1393-
impl<'a> RegionSpecificApi<'a> {
1393+
impl RegionSpecificApi<'_> {
13941394
fn request(&self, method: Method, url: &str) -> ApiResult<ApiRequest> {
13951395
self.api
13961396
.api

src/commands/react_native/xcode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn find_hermesc() -> String {
151151
/// The same as RN Tooling does it https://github.com/facebook/react-native/blob/435245978122d34a78014600562517c3bf96f92e/scripts/react-native-xcode.sh#L98C11-L98C11
152152
/// We ignore `USE_HERMES` as its behavior is not consistent between 0.65 - 0.72 and it the later versions it was removed as user override.
153153
fn is_hermes_enabled(hermesc: &String) -> bool {
154-
return Path::new(hermesc).exists();
154+
Path::new(hermesc).exists()
155155
}
156156

157157
pub fn execute(matches: &ArgMatches) -> Result<()> {

src/utils/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub trait ArgExt: Sized {
8484
fn version_arg(self, global: bool) -> Self;
8585
}
8686

87-
impl<'a: 'b, 'b> ArgExt for Command {
87+
impl ArgExt for Command {
8888
fn org_arg(self) -> Command {
8989
self.arg(
9090
Arg::new("org")

src/utils/chunks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl<'data> AsRef<(Digest, &'data [u8])> for Chunk<'data> {
148148
}
149149
}
150150

151-
impl<'data> ItemSize for Chunk<'data> {
151+
impl ItemSize for Chunk<'_> {
152152
fn size(&self) -> u64 {
153153
(self.0).1.len() as u64
154154
}

src/utils/dif.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl<'a> std::ops::Deref for SelfProguard<'a> {
181181
impl<'slf> symbolic::common::AsSelf<'slf> for SelfProguard<'_> {
182182
type Ref = SelfProguard<'slf>;
183183

184-
fn as_self(&'slf self) -> &Self::Ref {
184+
fn as_self(&'slf self) -> &'slf Self::Ref {
185185
self
186186
}
187187
}

src/utils/dif_upload.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ enum ParsedDif<'a> {
8686
impl<'slf, 'data: 'slf> AsSelf<'slf> for ParsedDif<'data> {
8787
type Ref = ParsedDif<'data>;
8888

89-
fn as_self(&'slf self) -> &Self::Ref {
89+
fn as_self(&'slf self) -> &'slf Self::Ref {
9090
self
9191
}
9292
}
@@ -275,7 +275,7 @@ impl<'data> DifMatch<'data> {
275275
}
276276
}
277277

278-
impl<'data> fmt::Debug for DifMatch<'data> {
278+
impl fmt::Debug for DifMatch<'_> {
279279
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
280280
f.debug_struct("DifMatch")
281281
.field("name", &self.name)
@@ -314,7 +314,7 @@ impl<'data> Deref for HashedDifMatch<'data> {
314314
}
315315
}
316316

317-
impl<'data> ItemSize for HashedDifMatch<'data> {
317+
impl ItemSize for HashedDifMatch<'_> {
318318
fn size(&self) -> u64 {
319319
self.deref().size()
320320
}
@@ -380,7 +380,7 @@ impl<'data> Deref for ChunkedDifMatch<'data> {
380380
}
381381
}
382382

383-
impl<'data> ItemSize for ChunkedDifMatch<'data> {
383+
impl ItemSize for ChunkedDifMatch<'_> {
384384
fn size(&self) -> u64 {
385385
self.deref().size()
386386
}
@@ -402,7 +402,7 @@ enum DifSource<'a> {
402402
Zip(&'a mut ZipFileArchive, &'a str),
403403
}
404404

405-
impl<'a> DifSource<'a> {
405+
impl DifSource<'_> {
406406
/// Resolves a file relative to the directory of `base`, stripping of the
407407
/// file name.
408408
fn get_relative_fs(base: &Path, path: &Path) -> Option<ByteView<'static>> {

src/utils/file_upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub struct UploadContext<'a> {
9393
pub chunk_upload_options: Option<&'a ChunkUploadOptions>,
9494
}
9595

96-
impl<'a> UploadContext<'a> {
96+
impl UploadContext<'_> {
9797
pub fn release(&self) -> Result<&str> {
9898
self.release
9999
.ok_or_else(|| anyhow!("A release slug is required (provide with --release)"))

src/utils/sourcemaps.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ fn url_matches_extension(url: &str, extensions: &[&str]) -> bool {
222222

223223
/// Return true iff url is a remote url (not a local path or embedded sourcemap).
224224
fn is_remote_url(url: &str) -> bool {
225-
return match Url::parse(url) {
225+
match Url::parse(url) {
226226
Ok(url) => url.scheme() != "data",
227227
Err(_) => false,
228-
};
228+
}
229229
}
230230

231231
/// Return true if url appears to be a URL path.

src/utils/vcs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub enum GitReference<'a> {
1717
Symbolic(&'a str),
1818
}
1919

20-
impl<'a> fmt::Display for GitReference<'a> {
20+
impl fmt::Display for GitReference<'_> {
2121
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2222
match *self {
2323
GitReference::Commit(ref c) => write!(f, "{c}"),

0 commit comments

Comments
 (0)