mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
chore: update to Rust 1.71 (#19822)
This commit is contained in:
parent
be9576ccc6
commit
ae2fecf45d
11 changed files with 18 additions and 21 deletions
2
.github/workflows/ci.generate.ts
vendored
2
.github/workflows/ci.generate.ts
vendored
|
@ -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";
|
||||
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(..) {
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.70"
|
||||
channel = "1.71.0"
|
||||
components = ["rustfmt", "clippy"]
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue