chore: update to Rust 1.66.0 (#17078)

This commit is contained in:
linbingquan 2022-12-18 06:20:15 +08:00 committed by GitHub
parent f2c9cc500c
commit f46df3e359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 84 additions and 84 deletions

View file

@ -73,8 +73,8 @@ pub fn merge_scripts(
}
let functions: Vec<FunctionCoverage> = range_to_funcs
.into_iter()
.map(|(_, funcs)| merge_functions(funcs).unwrap())
.into_values()
.map(|funcs| merge_functions(funcs).unwrap())
.collect();
Some(ScriptCoverage {

View file

@ -70,7 +70,7 @@ fn print_cache_info(
if let Some(location) = &location {
origin_dir =
origin_dir.join(&checksum::gen(&[location.to_string().as_bytes()]));
origin_dir.join(checksum::gen(&[location.to_string().as_bytes()]));
}
let local_storage_dir = origin_dir.join("local_storage");
@ -526,11 +526,9 @@ impl<'a> GraphDisplayContext<'a> {
Specifier(_) => specifier_str,
};
let maybe_size = match &package_or_specifier {
Package(package) => self
.npm_info
.package_sizes
.get(&package.id)
.map(|s| *s as u64),
Package(package) => {
self.npm_info.package_sizes.get(&package.id).copied()
}
Specifier(_) => module
.maybe_source
.as_ref()

View file

@ -77,7 +77,7 @@ deno {} "$@"
"#,
args.join(" "),
);
let mut file = File::create(&shim_data.file_path.with_extension(""))?;
let mut file = File::create(shim_data.file_path.with_extension(""))?;
file.write_all(template.as_bytes())?;
Ok(())
}
@ -1127,11 +1127,11 @@ mod tests {
// create extra files
{
let file_path = file_path.with_extension("tsconfig.json");
File::create(&file_path).unwrap();
File::create(file_path).unwrap();
}
{
let file_path = file_path.with_extension("lock.json");
File::create(&file_path).unwrap();
File::create(file_path).unwrap();
}
uninstall("echo_test".to_string(), Some(temp_dir.path().to_path_buf()))

View file

@ -120,7 +120,7 @@ fn validate_options(
format!("Failed to canonicalize: {}", output_dir.display())
})?;
if import_map_path.starts_with(&output_dir) {
if import_map_path.starts_with(output_dir) {
// canonicalize to make the test for this pass on the CI
let cwd = canonicalize_path(&std::env::current_dir()?)?;
// We don't allow using the output directory to help generate the

View file

@ -192,7 +192,7 @@ impl VendorTestBuilder {
}
pub fn new_import_map(&self, base_path: &str) -> ImportMap {
let base = ModuleSpecifier::from_file_path(&make_path(base_path)).unwrap();
let base = ModuleSpecifier::from_file_path(make_path(base_path)).unwrap();
ImportMap::new(base)
}