1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

chore: upgrade to rust 1.81.0 (#26261)

This commit is contained in:
林炳权 2024-10-16 00:10:07 +08:00 committed by GitHub
parent e4b52f5a76
commit 533a9b1086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 17 additions and 17 deletions

View file

@ -5,7 +5,7 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify";
// Bump this number when you want to purge the cache. // Bump this number when you want to purge the cache.
// Note: the tools/release/01_bump_crate_versions.ts script will update this version // Note: the tools/release/01_bump_crate_versions.ts script will update this version
// automatically via regex, so ensure that this line maintains this format. // automatically via regex, so ensure that this line maintains this format.
const cacheVersion = 18; const cacheVersion = 19;
const ubuntuX86Runner = "ubuntu-22.04"; const ubuntuX86Runner = "ubuntu-22.04";
const ubuntuX86XlRunner = "ubuntu-22.04-xl"; const ubuntuX86XlRunner = "ubuntu-22.04-xl";

View file

@ -361,8 +361,8 @@ jobs:
path: |- path: |-
~/.cargo/registry/index ~/.cargo/registry/index
~/.cargo/registry/cache ~/.cargo/registry/cache
key: '18-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}' key: '19-cargo-home-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '18-cargo-home-${{ matrix.os }}-${{ matrix.arch }}' restore-keys: '19-cargo-home-${{ matrix.os }}-${{ matrix.arch }}'
if: '!(matrix.skip)' if: '!(matrix.skip)'
- name: Restore cache build output (PR) - name: Restore cache build output (PR)
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
@ -375,7 +375,7 @@ jobs:
!./target/*/*.zip !./target/*/*.zip
!./target/*/*.tar.gz !./target/*/*.tar.gz
key: never_saved key: never_saved
restore-keys: '18-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-' restore-keys: '19-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-'
- name: Apply and update mtime cache - name: Apply and update mtime cache
if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))' if: '!(matrix.skip) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache uses: ./.github/mtime_cache
@ -685,7 +685,7 @@ jobs:
!./target/*/*.zip !./target/*/*.zip
!./target/*/*.sha256sum !./target/*/*.sha256sum
!./target/*/*.tar.gz !./target/*/*.tar.gz
key: '18-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}' key: '19-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
publish-canary: publish-canary:
name: publish canary name: publish canary
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04

View file

@ -3939,7 +3939,7 @@ pub struct OutliningSpan {
kind: OutliningSpanKind, kind: OutliningSpanKind,
} }
const FOLD_END_PAIR_CHARACTERS: &[u8] = &[b'}', b']', b')', b'`']; const FOLD_END_PAIR_CHARACTERS: &[u8] = b"}])`";
impl OutliningSpan { impl OutliningSpan {
pub fn to_folding_range( pub fn to_folding_range(

View file

@ -40,7 +40,7 @@ pub fn maybe_auth_header_for_npm_registry(
header::AUTHORIZATION, header::AUTHORIZATION,
header::HeaderValue::from_str(&format!( header::HeaderValue::from_str(&format!(
"Basic {}", "Basic {}",
BASE64_STANDARD.encode(&format!( BASE64_STANDARD.encode(format!(
"{}:{}", "{}:{}",
username.unwrap(), username.unwrap(),
password.unwrap() password.unwrap()

View file

@ -160,11 +160,11 @@ fn atomic_write_file(
data: &[u8], data: &[u8],
) -> std::io::Result<()> { ) -> std::io::Result<()> {
fs.write_file(temp_file_path, data)?; fs.write_file(temp_file_path, data)?;
fs.rename_file(temp_file_path, file_path).map_err(|err| { fs.rename_file(temp_file_path, file_path)
// clean up the created temp file on error .inspect_err(|_err| {
let _ = fs.remove_file(temp_file_path); // clean up the created temp file on error
err let _ = fs.remove_file(temp_file_path);
}) })
} }
let temp_file_path = get_atomic_file_path(file_path); let temp_file_path = get_atomic_file_path(file_path);

View file

@ -366,7 +366,7 @@ impl PermissionPrompter for TtyPrompter {
let mut input = String::new(); let mut input = String::new();
let result = stdin_lock.read_line(&mut input); let result = stdin_lock.read_line(&mut input);
let input = input.trim_end_matches(|c| c == '\r' || c == '\n'); let input = input.trim_end_matches(['\r', '\n']);
if result.is_err() || input.len() != 1 { if result.is_err() || input.len() != 1 {
break PromptResponse::Deny; break PromptResponse::Deny;
}; };

View file

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "1.80.1" channel = "1.81.0"
components = ["rustfmt", "clippy"] components = ["rustfmt", "clippy"]

View file

@ -241,7 +241,7 @@ fn compile_with_file_exists_error() {
"./compile/args.ts", "./compile/args.ts",
]) ])
.run() .run()
.assert_matches_text(&format!( .assert_matches_text(format!(
concat!( concat!(
"[WILDCARD]error: Could not compile to file '{}' because its parent directory ", "[WILDCARD]error: Could not compile to file '{}' because its parent directory ",
"is an existing file. You can use the `--output <file-path>` flag to ", "is an existing file. You can use the `--output <file-path>` flag to ",
@ -269,7 +269,7 @@ fn compile_with_directory_exists_error() {
&exe.to_string_lossy(), &exe.to_string_lossy(),
"./compile/args.ts" "./compile/args.ts"
]).run() ]).run()
.assert_matches_text(&format!( .assert_matches_text(format!(
concat!( concat!(
"[WILDCARD]error: Could not compile to file '{}' because a directory exists with ", "[WILDCARD]error: Could not compile to file '{}' because a directory exists with ",
"the same name. You can use the `--output <file-path>` flag to ", "the same name. You can use the `--output <file-path>` flag to ",
@ -297,7 +297,7 @@ fn compile_with_conflict_file_exists_error() {
&exe.to_string_lossy(), &exe.to_string_lossy(),
"./compile/args.ts" "./compile/args.ts"
]).run() ]).run()
.assert_matches_text(&format!( .assert_matches_text(format!(
concat!( concat!(
"[WILDCARD]error: Could not compile to file '{}' because the file already exists ", "[WILDCARD]error: Could not compile to file '{}' because the file already exists ",
"and cannot be overwritten. Please delete the existing file or ", "and cannot be overwritten. Please delete the existing file or ",