File tree 6 files changed +8
-12
lines changed
6 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ pub struct Entry<'a> {
144
144
entry : & ' a ResTableEntry ,
145
145
}
146
146
147
- impl < ' a > Entry < ' a > {
147
+ impl Entry < ' _ > {
148
148
pub fn id ( self ) -> ResTableRef {
149
149
self . id
150
150
}
Original file line number Diff line number Diff line change @@ -932,7 +932,7 @@ impl Chunk {
932
932
break ;
933
933
}
934
934
}
935
- let s = String :: from_utf16 ( unsafe { std :: mem :: transmute ( buf. as_slice ( ) ) } ) ?;
935
+ let s = String :: from_utf16 ( buf. as_slice ( ) ) ?;
936
936
strings. push ( s) ;
937
937
}
938
938
}
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ pub struct Artifact<'a> {
143
143
pub version : & ' a Version ,
144
144
}
145
145
146
- impl < ' a > Artifact < ' a > {
146
+ impl Artifact < ' _ > {
147
147
pub fn file_name ( self , ext : & str ) -> String {
148
148
format ! (
149
149
"{}-{}-{}.{}" ,
@@ -163,7 +163,7 @@ impl<'a> Artifact<'a> {
163
163
}
164
164
}
165
165
166
- impl < ' a > std:: fmt:: Display for Artifact < ' a > {
166
+ impl std:: fmt:: Display for Artifact < ' _ > {
167
167
fn fmt ( & self , f : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result {
168
168
write ! (
169
169
f,
Original file line number Diff line number Diff line change @@ -14,11 +14,7 @@ pub struct Pom {
14
14
15
15
impl Pom {
16
16
pub fn packaging ( & self ) -> & str {
17
- if let Some ( s) = self . packaging . as_deref ( ) {
18
- s
19
- } else {
20
- "jar"
21
- }
17
+ self . packaging . as_deref ( ) . unwrap_or ( "jar" )
22
18
}
23
19
24
20
pub fn dependencies ( & self ) -> & [ Dependency ] {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ pub struct DownloadManager<'a> {
15
15
client : Client ,
16
16
}
17
17
18
- impl < ' a > Download for DownloadManager < ' a > {
18
+ impl Download for DownloadManager < ' _ > {
19
19
fn download ( & self , url : & str , dest : & Path ) -> Result < ( ) > {
20
20
let pb = ProgressBar :: with_draw_target ( Some ( 0 ) , ProgressDrawTarget :: stdout ( ) )
21
21
. with_style (
@@ -233,7 +233,7 @@ impl WorkItem {
233
233
}
234
234
}
235
235
236
- impl < ' a > DownloadManager < ' a > {
236
+ impl DownloadManager < ' _ > {
237
237
pub fn android_jar ( & self ) -> Result < ( ) > {
238
238
let dir = self . env . android_sdk ( ) ;
239
239
let sdk = self . env . target_sdk_version ( ) ;
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ fn find_cde_start_pos<R: Read + Seek>(reader: &mut R) -> Result<u64> {
248
248
const CENTRAL_DIRECTORY_END_SIGNATURE : u32 = 0x06054b50 ;
249
249
const HEADER_SIZE : u64 = 22 ;
250
250
let file_length = reader. seek ( SeekFrom :: End ( 0 ) ) ?;
251
- let search_upper_bound = file_length. saturating_sub ( HEADER_SIZE + :: std :: u16:: MAX as u64 ) ;
251
+ let search_upper_bound = file_length. saturating_sub ( HEADER_SIZE + u16:: MAX as u64 ) ;
252
252
anyhow:: ensure!( file_length >= HEADER_SIZE , "Invalid zip header" ) ;
253
253
let mut pos = file_length - HEADER_SIZE ;
254
254
while pos >= search_upper_bound {
You can’t perform that action at this time.
0 commit comments