chore: update to Rust 1.71 (#19822)

This commit is contained in:
Matt Mastracci 2023-07-13 15:16:24 -06:00 committed by GitHub
parent c5ddb5f205
commit 8465bd0037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 18 additions and 21 deletions

View file

@ -5,7 +5,7 @@ import * as yaml from "https://deno.land/std@0.173.0/encoding/yaml.ts";
// Bump this number when you want to purge the cache.
// 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.
const cacheVersion = 44;
const cacheVersion = 45;
const Runners = (() => {
const ubuntuRunner = "ubuntu-22.04";

View file

@ -304,8 +304,8 @@ jobs:
path: |-
~/.cargo/registry/index
~/.cargo/registry/cache
key: '44-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '44-cargo-home-${{ matrix.os }}'
key: '45-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
restore-keys: '45-cargo-home-${{ matrix.os }}'
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr)'
- name: Restore cache build output (PR)
uses: actions/cache/restore@v3
@ -317,7 +317,7 @@ jobs:
!./target/*/*.zip
!./target/*/*.tar.gz
key: never_saved
restore-keys: '44-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
restore-keys: '45-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-'
- name: Apply and update mtime cache
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (!startsWith(github.ref, ''refs/tags/''))'
uses: ./.github/mtime_cache
@ -605,7 +605,7 @@ jobs:
!./target/*/gn_out
!./target/*/*.zip
!./target/*/*.tar.gz
key: '44-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
key: '45-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
publish-canary:
name: publish canary
runs-on: ubuntu-22.04

View file

@ -122,7 +122,7 @@ pub async fn snapshot_from_lockfile(
while let Some(result) = version_infos.next().await {
match result {
Ok(version_info) => {
let mut package = &mut packages[i];
let package = &mut packages[i];
package.dist = version_info.dist;
package.system = NpmResolutionPackageSystemInfo {
cpu: version_info.cpu,

View file

@ -86,7 +86,7 @@ impl<'rt> RangeTree<'rt> {
};
if is_chain_end {
let mut chain_iter = chain.drain(..);
let mut head: &'a mut RangeTree<'a> = chain_iter.next().unwrap();
let head: &'a mut RangeTree<'a> = chain_iter.next().unwrap();
for tree in chain_iter {
head.end = tree.end;
for sub_child in tree.children.drain(..) {
@ -100,7 +100,7 @@ impl<'rt> RangeTree<'rt> {
}
if !chain.is_empty() {
let mut chain_iter = chain.drain(..);
let mut head: &'a mut RangeTree<'a> = chain_iter.next().unwrap();
let head: &'a mut RangeTree<'a> = chain_iter.next().unwrap();
for tree in chain_iter {
head.end = tree.end;
for sub_child in tree.children.drain(..) {

View file

@ -530,8 +530,7 @@ impl ConditionalEventHandler for TabEventHandler {
if ctx.line().is_empty()
|| ctx.line()[..ctx.pos()]
.chars()
.rev()
.next()
.next_back()
.filter(|c| c.is_whitespace())
.is_some()
{

View file

@ -131,12 +131,9 @@ impl<T: Default> WebSocketUpgrade<T> {
HEADER_SEARCHER.get_or_init(|| TwoWaySearcher::new(b"\r\n\r\n"));
let header_searcher2 =
HEADER_SEARCHER2.get_or_init(|| TwoWaySearcher::new(b"\n\n"));
if let Some(..) = header_searcher.search_in(&self.buf) {
let (index, response) = parse_response(&self.buf)?;
let mut buf = std::mem::take(&mut self.buf);
self.state = Complete;
Ok(Some((response, buf.split_off(index).freeze())))
} else if let Some(..) = header_searcher2.search_in(&self.buf) {
if header_searcher.search_in(&self.buf).is_some()
|| header_searcher2.search_in(&self.buf).is_some()
{
let (index, response) = parse_response(&self.buf)?;
let mut buf = std::mem::take(&mut self.buf);
self.state = Complete;

View file

@ -37,7 +37,7 @@ extern "C" fn call_fn(info: *const v8::FunctionCallbackInfo) {
};
// SAFETY: pointer from Box::into_raw.
let mut info = unsafe { &mut *info_ptr };
let info = unsafe { &mut *info_ptr };
info.args = &args as *const _ as *const c_void;
if let Some(f) = info.cb {

View file

@ -63,5 +63,5 @@ pub(crate) fn hr_timer_lock() -> windows::HrTimerLock {
/// No-op on other platforms.
#[cfg(not(target_os = "windows"))]
pub(crate) fn hr_timer_lock() -> (std::marker::PhantomData<()>,) {
(std::marker::PhantomData::default(),)
Default::default()
}

View file

@ -210,7 +210,7 @@ pub fn mem_info() -> Option<MemInfo> {
mem_info.buffers = info.bufferram * mem_unit;
}
}
#[cfg(any(target_vendor = "apple"))]
#[cfg(target_vendor = "apple")]
{
let mut mib: [i32; 2] = [0, 0];
mib[0] = libc::CTL_HW;

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "1.70"
channel = "1.71.0"
components = ["rustfmt", "clippy"]

View file

@ -84,7 +84,8 @@ const cleanupCallback = new Deno.UnsafeCallback(
{ parameters: [], result: "void" },
() => {
console.log("Callback being called");
queueMicrotask(() => cleanup());
// Defer the cleanup to give the spawned thread all the time it needs to properly shut down
setTimeout(() => cleanup(), 100);
},
);