@@ -52,12 +52,12 @@ pub struct Binary {
52
52
/// The `system-deps` formatted name of another library which has binaries specified.
53
53
/// This library will alias the configuration of the followed one. If `url` is specified
54
54
/// alongside this field, it will no longer follow the original configuration.
55
- follows : Option < String > ,
55
+ _follows : Option < String > ,
56
56
}
57
57
58
58
impl Binary {
59
59
pub fn paths ( & self , name : & str ) -> Result < HashSet < PathBuf > , Error > {
60
- // Set this binary to follow
60
+ // TODO: Set this binary to follow
61
61
//if let Some(follows) = self.follows {
62
62
// follow_list.insert(name.clone(), follows);
63
63
//}
@@ -176,7 +176,7 @@ pub fn get_path(name: &str) -> &[&'static str] {{
176
176
/// Checks if the target directory is valid and if binaries need to be redownloaded.
177
177
/// On an `Ok` result, if the value is true it means that the directory is correct.
178
178
fn check_valid_dir ( dst : & Path , checksum : Option < & str > ) -> Result < bool , Error > {
179
- let e = |e| Error :: InvalidDirectory ( e ) ;
179
+ let e = Error :: InvalidDirectory ;
180
180
181
181
// If it doesn't exist yet the download will need to happen
182
182
if !dst. try_exists ( ) . map_err ( e) ? {
@@ -224,7 +224,7 @@ fn download(url: &str, dst: &Path) -> Result<(), Error> {
224
224
let path = Path :: new ( file_path) ;
225
225
match ext {
226
226
Ok ( ext) => {
227
- let file = fs:: read ( path) . map_err ( |e| Error :: LocalFileError ( e ) ) ?;
227
+ let file = fs:: read ( path) . map_err ( Error :: LocalFileError ) ?;
228
228
decompress ( & file, dst, ext) ?;
229
229
}
230
230
Err ( e) => {
@@ -234,11 +234,10 @@ fn download(url: &str, dst: &Path) -> Result<(), Error> {
234
234
}
235
235
if !dst. read_link ( ) . is_ok_and ( |l| l == path) {
236
236
#[ cfg( unix) ]
237
- std:: os:: unix:: fs:: symlink ( file_path, dst)
238
- . map_err ( |e| Error :: SymlinkError ( e) ) ?;
237
+ std:: os:: unix:: fs:: symlink ( file_path, dst) . map_err ( Error :: SymlinkError ) ?;
239
238
#[ cfg( windows) ]
240
239
std:: os:: windows:: fs:: symlink_dir ( file_path, dst)
241
- . map_err ( |e| Error :: SymlinkError ( e ) ) ?;
240
+ . map_err ( Error :: SymlinkError ) ?;
242
241
}
243
242
}
244
243
} ;
@@ -250,7 +249,9 @@ fn download(url: &str, dst: &Path) -> Result<(), Error> {
250
249
#[ cfg( feature = "web" ) ]
251
250
{
252
251
let ext = ext?;
253
- let file = reqwest:: blocking:: get ( url) . and_then ( |req| req. bytes ( ) ) ?;
252
+ let file = reqwest:: blocking:: get ( url)
253
+ . and_then ( |req| req. bytes ( ) )
254
+ . map_err ( Error :: DownloadError ) ?;
254
255
decompress ( & file, dst, ext) ?;
255
256
}
256
257
}
@@ -265,7 +266,7 @@ fn download(url: &str, dst: &Path) -> Result<(), Error> {
265
266
fn decompress ( file : & [ u8 ] , dst : & Path , ext : Extension ) -> Result < ( ) , Error > {
266
267
#[ cfg( any( feature = "gz" , feature = "xz" , feature = "zip" , feature = "pkg" ) ) ]
267
268
{
268
- let e = |e| Error :: DecompressError ( e ) ;
269
+ let e = Error :: DecompressError ;
269
270
270
271
match ext {
271
272
#[ cfg( feature = "gz" ) ]
0 commit comments