1+ #![ allow(
2+ clippy:: disallowed_types,
3+ clippy:: disallowed_methods,
4+ clippy:: disallowed_macros,
5+ reason = "non-vite crate"
6+ ) ]
7+
18use std:: {
29 env:: { self , current_dir} ,
310 fs,
@@ -21,7 +28,7 @@ fn download(url: &str) -> anyhow::Result<impl Read + use<>> {
2128 let output = curl. wait_with_output ( ) ?;
2229 if !output. status . success ( ) {
2330 bail ! ( "curl exited with status {} trying to download {}" , output. status, url) ;
24- } ;
31+ }
2532 Ok ( Cursor :: new ( output. stdout ) )
2633}
2734
@@ -50,19 +57,22 @@ fn download_and_unpack_tar_gz(url: &str, path: &str) -> anyhow::Result<Vec<u8>>
5057 Ok ( data)
5158}
5259
53- const MACOS_BINARY_DOWNLOADS : & [ ( & str , & [ ( & str , & str , u128 ) ] ) ] = & [
60+ /// (url, `path_in_targz`, `expected_hash`)
61+ type BinaryDownload = ( & ' static str , & ' static str , u128 ) ;
62+
63+ const MACOS_BINARY_DOWNLOADS : & [ ( & str , & [ BinaryDownload ] ) ] = & [
5464 (
5565 "aarch64" ,
5666 & [
5767 (
5868 "https://github.com/branchseer/oils-for-unix-build/releases/download/oils-for-unix-0.37.0/oils-for-unix-0.37.0-darwin-arm64.tar.gz" ,
5969 "oils-for-unix" ,
60- 282073174065923237490435663309538399576 ,
70+ 282_073_174_065_923_237_490_435_663_309_538_399_576 ,
6171 ) ,
6272 (
6373 "https://github.com/uutils/coreutils/releases/download/0.4.0/coreutils-0.4.0-aarch64-apple-darwin.tar.gz" ,
6474 "coreutils-0.4.0-aarch64-apple-darwin/coreutils" ,
65- 35998406686137668997937014088186935383 ,
75+ 35_998_406_686_137_668_997_937_014_088_186_935_383 ,
6676 ) ,
6777 ] ,
6878 ) ,
@@ -72,12 +82,12 @@ const MACOS_BINARY_DOWNLOADS: &[(&str, &[(&str, &str, u128)])] = &[
7282 (
7383 "https://github.com/branchseer/oils-for-unix-build/releases/download/oils-for-unix-0.37.0/oils-for-unix-0.37.0-darwin-x86_64.tar.gz" ,
7484 "oils-for-unix" ,
75- 142673558272427867831039361796426010330 ,
85+ 142_673_558_272_427_867_831_039_361_796_426_010_330 ,
7686 ) ,
7787 (
7888 "https://github.com/uutils/coreutils/releases/download/0.4.0/coreutils-0.4.0-x86_64-apple-darwin.tar.gz" ,
7989 "coreutils-0.4.0-x86_64-apple-darwin/coreutils" ,
80- 120898281113671104995723556995187526689 ,
90+ 120_898_281_113_671_104_995_723_556_995_187_526_689 ,
8191 ) ,
8292 ] ,
8393 ) ,
0 commit comments