mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 20:38:55 +00:00
chore: upgrade to rust 1.79 (#24207)
This commit is contained in:
parent
e19ee6eecc
commit
0f48313565
2
.github/workflows/ci.generate.ts
vendored
2
.github/workflows/ci.generate.ts
vendored
@ -59,7 +59,7 @@ const prCacheKeyPrefix =
|
|||||||
`${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;
|
`${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;
|
||||||
|
|
||||||
// Note that you may need to add more version to the `apt-get remove` line below if you change this
|
// Note that you may need to add more version to the `apt-get remove` line below if you change this
|
||||||
const llvmVersion = 17;
|
const llvmVersion = 18;
|
||||||
const installPkgsCommand =
|
const installPkgsCommand =
|
||||||
`sudo apt-get install --no-install-recommends clang-${llvmVersion} lld-${llvmVersion} clang-tools-${llvmVersion} clang-format-${llvmVersion} clang-tidy-${llvmVersion}`;
|
`sudo apt-get install --no-install-recommends clang-${llvmVersion} lld-${llvmVersion} clang-tools-${llvmVersion} clang-format-${llvmVersion} clang-tidy-${llvmVersion}`;
|
||||||
const sysRootStep = {
|
const sysRootStep = {
|
||||||
|
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@ -261,14 +261,14 @@ jobs:
|
|||||||
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' > /dev/null 2> /dev/null
|
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' > /dev/null 2> /dev/null
|
||||||
|
|
||||||
# Install clang-XXX, lld-XXX, and debootstrap.
|
# Install clang-XXX, lld-XXX, and debootstrap.
|
||||||
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" |
|
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" |
|
||||||
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-17.list
|
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-18.list
|
||||||
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
|
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
|
||||||
gpg --dearmor |
|
gpg --dearmor |
|
||||||
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
|
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
# this was unreliable sometimes, so try again if it fails
|
# this was unreliable sometimes, so try again if it fails
|
||||||
sudo apt-get install --no-install-recommends clang-17 lld-17 clang-tools-17 clang-format-17 clang-tidy-17 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends clang-17 lld-17 clang-tools-17 clang-format-17 clang-tidy-17
|
sudo apt-get install --no-install-recommends clang-18 lld-18 clang-tools-18 clang-format-18 clang-tidy-18 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends clang-18 lld-18 clang-tools-18 clang-format-18 clang-tidy-18
|
||||||
# Fix alternatives
|
# Fix alternatives
|
||||||
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
|
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
|
||||||
|
|
||||||
@ -305,8 +305,8 @@ jobs:
|
|||||||
CARGO_PROFILE_RELEASE_LTO=false
|
CARGO_PROFILE_RELEASE_LTO=false
|
||||||
RUSTFLAGS<<__1
|
RUSTFLAGS<<__1
|
||||||
-C linker-plugin-lto=true
|
-C linker-plugin-lto=true
|
||||||
-C linker=clang-17
|
-C linker=clang-18
|
||||||
-C link-arg=-fuse-ld=lld-17
|
-C link-arg=-fuse-ld=lld-18
|
||||||
-C link-arg=-ldl
|
-C link-arg=-ldl
|
||||||
-C link-arg=-Wl,--allow-shlib-undefined
|
-C link-arg=-Wl,--allow-shlib-undefined
|
||||||
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
|
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
|
||||||
@ -316,8 +316,8 @@ jobs:
|
|||||||
__1
|
__1
|
||||||
RUSTDOCFLAGS<<__1
|
RUSTDOCFLAGS<<__1
|
||||||
-C linker-plugin-lto=true
|
-C linker-plugin-lto=true
|
||||||
-C linker=clang-17
|
-C linker=clang-18
|
||||||
-C link-arg=-fuse-ld=lld-17
|
-C link-arg=-fuse-ld=lld-18
|
||||||
-C link-arg=-ldl
|
-C link-arg=-ldl
|
||||||
-C link-arg=-Wl,--allow-shlib-undefined
|
-C link-arg=-Wl,--allow-shlib-undefined
|
||||||
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
|
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
|
||||||
@ -325,7 +325,7 @@ jobs:
|
|||||||
--cfg tokio_unstable
|
--cfg tokio_unstable
|
||||||
$RUSTFLAGS
|
$RUSTFLAGS
|
||||||
__1
|
__1
|
||||||
CC=/usr/bin/clang-17
|
CC=/usr/bin/clang-18
|
||||||
CFLAGS=-flto=thin $CFLAGS
|
CFLAGS=-flto=thin $CFLAGS
|
||||||
" > $GITHUB_ENV
|
" > $GITHUB_ENV
|
||||||
- name: Remove macOS cURL --ipv4 flag
|
- name: Remove macOS cURL --ipv4 flag
|
||||||
|
153
cli/cdp.rs
153
cli/cdp.rs
@ -1,7 +1,6 @@
|
|||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/>
|
||||||
use deno_core::serde_json;
|
|
||||||
use deno_core::serde_json::Value;
|
use deno_core::serde_json::Value;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use serde::Deserializer;
|
use serde::Deserializer;
|
||||||
@ -18,14 +17,6 @@ pub struct AwaitPromiseArgs {
|
|||||||
pub generate_preview: Option<bool>,
|
pub generate_preview: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct AwaitPromiseResponse {
|
|
||||||
pub result: RemoteObject,
|
|
||||||
pub exception_details: Option<ExceptionDetails>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn>
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
@ -72,14 +63,6 @@ pub struct CompileScriptArgs {
|
|||||||
pub execution_context_id: Option<ExecutionContextId>,
|
pub execution_context_id: Option<ExecutionContextId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct CompileScriptResponse {
|
|
||||||
pub script_id: Option<ScriptId>,
|
|
||||||
pub exception_details: Option<ExceptionDetails>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate>
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
@ -147,9 +130,6 @@ pub struct GetPropertiesArgs {
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct GetPropertiesResponse {
|
pub struct GetPropertiesResponse {
|
||||||
pub result: Vec<PropertyDescriptor>,
|
pub result: Vec<PropertyDescriptor>,
|
||||||
pub internal_properties: Option<Vec<InternalPropertyDescriptor>>,
|
|
||||||
pub private_properties: Option<Vec<PrivatePropertyDescriptor>>,
|
|
||||||
pub exception_details: Option<ExceptionDetails>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames>
|
||||||
@ -176,13 +156,6 @@ pub struct QueryObjectsArgs {
|
|||||||
pub object_group: Option<String>,
|
pub object_group: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct QueryObjectsResponse {
|
|
||||||
pub objects: RemoteObject,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject>
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
@ -221,14 +194,6 @@ pub struct RunScriptArgs {
|
|||||||
pub await_promise: Option<bool>,
|
pub await_promise: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct RunScriptResponse {
|
|
||||||
pub result: RemoteObject,
|
|
||||||
pub exception_details: Option<ExceptionDetails>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setAsyncCallStackDepth>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setAsyncCallStackDepth>
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
@ -244,15 +209,11 @@ pub struct SetAsyncCallStackDepthArgs {
|
|||||||
pub struct RemoteObject {
|
pub struct RemoteObject {
|
||||||
#[serde(rename = "type")]
|
#[serde(rename = "type")]
|
||||||
pub kind: String,
|
pub kind: String,
|
||||||
pub subtype: Option<String>,
|
|
||||||
pub class_name: Option<String>,
|
|
||||||
#[serde(default, deserialize_with = "deserialize_some")]
|
#[serde(default, deserialize_with = "deserialize_some")]
|
||||||
pub value: Option<Value>,
|
pub value: Option<Value>,
|
||||||
pub unserializable_value: Option<UnserializableValue>,
|
pub unserializable_value: Option<UnserializableValue>,
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
pub object_id: Option<RemoteObjectId>,
|
pub object_id: Option<RemoteObjectId>,
|
||||||
pub preview: Option<ObjectPreview>,
|
|
||||||
pub custom_preview: Option<CustomPreview>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Any value that is present is considered Some value, including null.
|
// Any value that is present is considered Some value, including null.
|
||||||
@ -265,61 +226,12 @@ where
|
|||||||
Deserialize::deserialize(deserializer).map(Some)
|
Deserialize::deserialize(deserializer).map(Some)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ObjectPreview>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct ObjectPreview {
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
pub kind: String,
|
|
||||||
pub subtype: Option<String>,
|
|
||||||
pub description: Option<String>,
|
|
||||||
pub overflow: bool,
|
|
||||||
pub properties: Vec<PropertyPreview>,
|
|
||||||
pub entries: Option<Vec<EntryPreview>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyPreview>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct PropertyPreview {
|
|
||||||
pub name: String,
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
pub kind: String,
|
|
||||||
pub value: Option<String>,
|
|
||||||
pub value_preview: Option<ObjectPreview>,
|
|
||||||
pub subtype: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-EntryPreview>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct EntryPreview {
|
|
||||||
pub key: Option<ObjectPreview>,
|
|
||||||
pub value: ObjectPreview,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CustomPreview>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct CustomPreview {
|
|
||||||
pub header: String,
|
|
||||||
pub body_getter_id: RemoteObjectId,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExceptionDetails>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExceptionDetails>
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ExceptionDetails {
|
pub struct ExceptionDetails {
|
||||||
pub exception_id: u64,
|
|
||||||
pub text: String,
|
pub text: String,
|
||||||
pub line_number: u64,
|
|
||||||
pub column_number: u64,
|
|
||||||
pub script_id: Option<ScriptId>,
|
|
||||||
pub url: Option<String>,
|
|
||||||
pub stack_trace: Option<StackTrace>,
|
|
||||||
pub exception: Option<RemoteObject>,
|
pub exception: Option<RemoteObject>,
|
||||||
pub execution_context_id: Option<ExecutionContextId>,
|
|
||||||
pub exception_meta_data: Option<serde_json::Map<String, Value>>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ExceptionDetails {
|
impl ExceptionDetails {
|
||||||
@ -333,35 +245,6 @@ impl ExceptionDetails {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTrace>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct StackTrace {
|
|
||||||
pub description: Option<String>,
|
|
||||||
pub call_frames: Vec<CallFrame>,
|
|
||||||
pub parent: Option<Box<StackTrace>>,
|
|
||||||
pub parent_id: Option<StackTraceId>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallFrame>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct CallFrame {
|
|
||||||
pub function_name: String,
|
|
||||||
pub script_id: ScriptId,
|
|
||||||
pub url: String,
|
|
||||||
pub line_number: u64,
|
|
||||||
pub column_number: u64,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTraceId>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct StackTraceId {
|
|
||||||
pub id: String,
|
|
||||||
pub debugger_id: Option<UniqueDebuggerId>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallArgument>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallArgument>
|
||||||
#[derive(Debug, Clone, Serialize)]
|
#[derive(Debug, Clone, Serialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
@ -384,38 +267,11 @@ impl From<&RemoteObject> for CallArgument {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyDescriptor>
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct PropertyDescriptor {
|
pub struct PropertyDescriptor {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub value: Option<RemoteObject>,
|
|
||||||
pub writable: Option<bool>,
|
|
||||||
pub get: Option<RemoteObject>,
|
|
||||||
pub set: Option<RemoteObject>,
|
|
||||||
pub configurable: bool,
|
|
||||||
pub enumerable: bool,
|
|
||||||
pub was_thrown: Option<bool>,
|
|
||||||
pub is_own: Option<bool>,
|
|
||||||
pub symbol: Option<RemoteObject>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct InternalPropertyDescriptor {
|
|
||||||
pub name: String,
|
|
||||||
pub value: Option<RemoteObject>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PrivatePropertyDescriptor>
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct PrivatePropertyDescriptor {
|
|
||||||
pub name: String,
|
|
||||||
pub value: Option<RemoteObject>,
|
|
||||||
pub get: Option<RemoteObject>,
|
|
||||||
pub set: Option<RemoteObject>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObjectId>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObjectId>
|
||||||
@ -433,9 +289,6 @@ pub type TimeDelta = u64;
|
|||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UnserializableValue>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UnserializableValue>
|
||||||
pub type UnserializableValue = String;
|
pub type UnserializableValue = String;
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UniqueDebuggerId>
|
|
||||||
pub type UniqueDebuggerId = String;
|
|
||||||
|
|
||||||
/// <https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#method-setScriptSource>
|
/// <https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#method-setScriptSource>
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct SetScriptSourceResponse {
|
pub struct SetScriptSourceResponse {
|
||||||
@ -523,7 +376,6 @@ pub struct Notification {
|
|||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ExceptionThrown {
|
pub struct ExceptionThrown {
|
||||||
pub timestamp: f64,
|
|
||||||
pub exception_details: ExceptionDetails,
|
pub exception_details: ExceptionDetails,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,8 +391,5 @@ pub struct ExecutionContextCreated {
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ExecutionContextDescription {
|
pub struct ExecutionContextDescription {
|
||||||
pub id: ExecutionContextId,
|
pub id: ExecutionContextId,
|
||||||
pub origin: String,
|
|
||||||
pub name: String,
|
|
||||||
pub unique_id: String,
|
|
||||||
pub aux_data: Value,
|
pub aux_data: Value,
|
||||||
}
|
}
|
||||||
|
@ -864,7 +864,6 @@ impl CliFactory {
|
|||||||
// integration.
|
// integration.
|
||||||
skip_op_registration: self.options.sub_command().is_run(),
|
skip_op_registration: self.options.sub_command().is_run(),
|
||||||
log_level: self.options.log_level().unwrap_or(log::Level::Info).into(),
|
log_level: self.options.log_level().unwrap_or(log::Level::Info).into(),
|
||||||
coverage_dir: self.options.coverage_dir(),
|
|
||||||
enable_op_summary_metrics: self.options.enable_op_summary_metrics(),
|
enable_op_summary_metrics: self.options.enable_op_summary_metrics(),
|
||||||
enable_testing_features: self.options.enable_testing_features(),
|
enable_testing_features: self.options.enable_testing_features(),
|
||||||
has_node_modules_dir: self.options.has_node_modules_dir(),
|
has_node_modules_dir: self.options.has_node_modules_dir(),
|
||||||
|
@ -1780,7 +1780,7 @@ impl ConfigTree {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.first_folder = settings.first_folder.clone();
|
self.first_folder.clone_from(&settings.first_folder);
|
||||||
self.scopes = Arc::new(scopes);
|
self.scopes = Arc::new(scopes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -795,8 +795,6 @@ impl Compiler {
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct MatchResult {
|
pub struct MatchResult {
|
||||||
pub path: String,
|
|
||||||
pub index: usize,
|
|
||||||
pub params: HashMap<StringOrNumber, StringOrVec>,
|
pub params: HashMap<StringOrNumber, StringOrVec>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -824,9 +822,6 @@ impl Matcher {
|
|||||||
/// Match a string path, optionally returning the match result.
|
/// Match a string path, optionally returning the match result.
|
||||||
pub fn matches(&self, path: &str) -> Option<MatchResult> {
|
pub fn matches(&self, path: &str) -> Option<MatchResult> {
|
||||||
let caps = self.re.captures(path).ok()??;
|
let caps = self.re.captures(path).ok()??;
|
||||||
let m = caps.get(0)?;
|
|
||||||
let path = m.as_str().to_string();
|
|
||||||
let index = m.start();
|
|
||||||
let mut params = HashMap::new();
|
let mut params = HashMap::new();
|
||||||
if let Some(keys) = &self.maybe_keys {
|
if let Some(keys) = &self.maybe_keys {
|
||||||
for (i, key) in keys.iter().enumerate() {
|
for (i, key) in keys.iter().enumerate() {
|
||||||
@ -852,11 +847,7 @@ impl Matcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Some(MatchResult {
|
Some(MatchResult { params })
|
||||||
path,
|
|
||||||
index,
|
|
||||||
params,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,7 +502,7 @@ impl RedirectResolver {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
for (specifier, mut entry) in chain {
|
for (specifier, mut entry) in chain {
|
||||||
entry.destination = destination.clone();
|
entry.destination.clone_from(&destination);
|
||||||
self.entries.insert(specifier, Some(Arc::new(entry)));
|
self.entries.insert(specifier, Some(Arc::new(entry)));
|
||||||
}
|
}
|
||||||
destination
|
destination
|
||||||
|
@ -350,7 +350,7 @@ impl TestRun {
|
|||||||
test::TestEvent::Wait(id) => {
|
test::TestEvent::Wait(id) => {
|
||||||
reporter.report_wait(tests.read().get(&id).unwrap());
|
reporter.report_wait(tests.read().get(&id).unwrap());
|
||||||
}
|
}
|
||||||
test::TestEvent::Output(_, output) => {
|
test::TestEvent::Output(output) => {
|
||||||
reporter.report_output(&output);
|
reporter.report_output(&output);
|
||||||
}
|
}
|
||||||
test::TestEvent::Slow(id, elapsed) => {
|
test::TestEvent::Slow(id, elapsed) => {
|
||||||
|
@ -385,7 +385,10 @@ impl TsServer {
|
|||||||
}
|
}
|
||||||
None => None,
|
None => None,
|
||||||
};
|
};
|
||||||
*self.inspector_server.lock() = maybe_inspector_server.clone();
|
self
|
||||||
|
.inspector_server
|
||||||
|
.lock()
|
||||||
|
.clone_from(&maybe_inspector_server);
|
||||||
// TODO(bartlomieju): why is the join_handle ignored here? Should we store it
|
// TODO(bartlomieju): why is the join_handle ignored here? Should we store it
|
||||||
// on the `TsServer` struct.
|
// on the `TsServer` struct.
|
||||||
let receiver = self.receiver.lock().take().unwrap();
|
let receiver = self.receiver.lock().take().unwrap();
|
||||||
@ -1718,7 +1721,7 @@ fn display_parts_to_string(
|
|||||||
"linkName" => {
|
"linkName" => {
|
||||||
if let Some(link) = current_link.as_mut() {
|
if let Some(link) = current_link.as_mut() {
|
||||||
link.name = Some(part.text.clone());
|
link.name = Some(part.text.clone());
|
||||||
link.target = part.target.clone();
|
link.target.clone_from(&part.target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"linkText" => {
|
"linkText" => {
|
||||||
@ -2271,7 +2274,7 @@ impl RenameLocations {
|
|||||||
let asset_or_doc = language_server.get_asset_or_document(&specifier)?;
|
let asset_or_doc = language_server.get_asset_or_document(&specifier)?;
|
||||||
|
|
||||||
// ensure TextDocumentEdit for `location.file_name`.
|
// ensure TextDocumentEdit for `location.file_name`.
|
||||||
if text_document_edit_map.get(&uri).is_none() {
|
if !text_document_edit_map.contains_key(&uri) {
|
||||||
text_document_edit_map.insert(
|
text_document_edit_map.insert(
|
||||||
uri.clone(),
|
uri.clone(),
|
||||||
lsp::TextDocumentEdit {
|
lsp::TextDocumentEdit {
|
||||||
@ -3633,7 +3636,7 @@ impl CompletionEntry {
|
|||||||
.check_specifier(&import_specifier, specifier)
|
.check_specifier(&import_specifier, specifier)
|
||||||
.or_else(|| relative_specifier(specifier, &import_specifier))
|
.or_else(|| relative_specifier(specifier, &import_specifier))
|
||||||
{
|
{
|
||||||
display_source = new_module_specifier.clone();
|
display_source.clone_from(&new_module_specifier);
|
||||||
if new_module_specifier != import_data.module_specifier {
|
if new_module_specifier != import_data.module_specifier {
|
||||||
specifier_rewrite =
|
specifier_rewrite =
|
||||||
Some((import_data.module_specifier, new_module_specifier));
|
Some((import_data.module_specifier, new_module_specifier));
|
||||||
|
@ -264,7 +264,9 @@ fn arc_u8_to_arc_str(
|
|||||||
// SAFETY: the string is valid UTF-8, and the layout Arc<[u8]> is the same as
|
// SAFETY: the string is valid UTF-8, and the layout Arc<[u8]> is the same as
|
||||||
// Arc<str>. This is proven by the From<Arc<str>> impl for Arc<[u8]> from the
|
// Arc<str>. This is proven by the From<Arc<str>> impl for Arc<[u8]> from the
|
||||||
// standard library.
|
// standard library.
|
||||||
Ok(unsafe { std::mem::transmute(arc_u8) })
|
Ok(unsafe {
|
||||||
|
std::mem::transmute::<std::sync::Arc<[u8]>, std::sync::Arc<str>>(arc_u8)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
struct StandaloneModuleLoaderFactory {
|
struct StandaloneModuleLoaderFactory {
|
||||||
@ -548,7 +550,6 @@ pub async fn run(
|
|||||||
CliMainWorkerOptions {
|
CliMainWorkerOptions {
|
||||||
argv: metadata.argv,
|
argv: metadata.argv,
|
||||||
log_level: WorkerLogLevel::Info,
|
log_level: WorkerLogLevel::Info,
|
||||||
coverage_dir: None,
|
|
||||||
enable_op_summary_metrics: false,
|
enable_op_summary_metrics: false,
|
||||||
enable_testing_features: false,
|
enable_testing_features: false,
|
||||||
has_node_modules_dir,
|
has_node_modules_dir,
|
||||||
|
@ -169,7 +169,7 @@ impl BenchReporter for ConsoleReporter {
|
|||||||
fn report_register(&mut self, _desc: &BenchDescription) {}
|
fn report_register(&mut self, _desc: &BenchDescription) {}
|
||||||
|
|
||||||
fn report_wait(&mut self, desc: &BenchDescription) {
|
fn report_wait(&mut self, desc: &BenchDescription) {
|
||||||
self.name = desc.name.clone();
|
self.name.clone_from(&desc.name);
|
||||||
|
|
||||||
match &desc.group {
|
match &desc.group {
|
||||||
None => {}
|
None => {}
|
||||||
|
@ -150,7 +150,7 @@ impl<'rt> RangeTree<'rt> {
|
|||||||
Self::from_sorted_ranges_inner(
|
Self::from_sorted_ranges_inner(
|
||||||
rta,
|
rta,
|
||||||
&mut ranges.iter().peekable(),
|
&mut ranges.iter().peekable(),
|
||||||
::std::usize::MAX,
|
usize::MAX,
|
||||||
0,
|
0,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ pub struct OidcTokenResponse {
|
|||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct PublishingTaskError {
|
pub struct PublishingTaskError {
|
||||||
|
#[allow(dead_code)]
|
||||||
pub code: String,
|
pub code: String,
|
||||||
pub message: String,
|
pub message: String,
|
||||||
}
|
}
|
||||||
|
@ -570,6 +570,7 @@ static DEFAULT_REKOR_URL: Lazy<String> = Lazy::new(|| {
|
|||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct LogEntry {
|
pub struct LogEntry {
|
||||||
|
#[allow(dead_code)]
|
||||||
#[serde(rename = "logID")]
|
#[serde(rename = "logID")]
|
||||||
pub log_id: String,
|
pub log_id: String,
|
||||||
pub log_index: u64,
|
pub log_index: u64,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
||||||
|
|
||||||
use super::TestEvent;
|
use super::TestEvent;
|
||||||
use super::TestStdioStream;
|
|
||||||
use deno_core::futures::future::poll_fn;
|
use deno_core::futures::future::poll_fn;
|
||||||
use deno_core::parking_lot;
|
use deno_core::parking_lot;
|
||||||
use deno_core::parking_lot::lock_api::RawMutex;
|
use deno_core::parking_lot::lock_api::RawMutex;
|
||||||
@ -105,7 +104,6 @@ impl TestEventReceiver {
|
|||||||
|
|
||||||
struct TestStream {
|
struct TestStream {
|
||||||
id: usize,
|
id: usize,
|
||||||
which: TestStdioStream,
|
|
||||||
read_opt: Option<AsyncPipeRead>,
|
read_opt: Option<AsyncPipeRead>,
|
||||||
sender: UnboundedSender<(usize, TestEvent)>,
|
sender: UnboundedSender<(usize, TestEvent)>,
|
||||||
}
|
}
|
||||||
@ -113,7 +111,6 @@ struct TestStream {
|
|||||||
impl TestStream {
|
impl TestStream {
|
||||||
fn new(
|
fn new(
|
||||||
id: usize,
|
id: usize,
|
||||||
which: TestStdioStream,
|
|
||||||
pipe_reader: PipeRead,
|
pipe_reader: PipeRead,
|
||||||
sender: UnboundedSender<(usize, TestEvent)>,
|
sender: UnboundedSender<(usize, TestEvent)>,
|
||||||
) -> std::io::Result<Self> {
|
) -> std::io::Result<Self> {
|
||||||
@ -121,7 +118,6 @@ impl TestStream {
|
|||||||
let read_opt = Some(pipe_reader.into_async()?);
|
let read_opt = Some(pipe_reader.into_async()?);
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
id,
|
id,
|
||||||
which,
|
|
||||||
read_opt,
|
read_opt,
|
||||||
sender,
|
sender,
|
||||||
})
|
})
|
||||||
@ -135,7 +131,7 @@ impl TestStream {
|
|||||||
true
|
true
|
||||||
} else if self
|
} else if self
|
||||||
.sender
|
.sender
|
||||||
.send((self.id, TestEvent::Output(self.which, buffer)))
|
.send((self.id, TestEvent::Output(buffer)))
|
||||||
.is_err()
|
.is_err()
|
||||||
{
|
{
|
||||||
self.read_opt.take();
|
self.read_opt.take();
|
||||||
@ -275,14 +271,9 @@ impl TestEventSenderFactory {
|
|||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
runtime.block_on(tokio::task::unconstrained(async move {
|
runtime.block_on(tokio::task::unconstrained(async move {
|
||||||
let mut test_stdout = TestStream::new(
|
let mut test_stdout =
|
||||||
id,
|
TestStream::new(id, stdout_reader, sender.clone())?;
|
||||||
TestStdioStream::Stdout,
|
let mut test_stderr = TestStream::new(id, stderr_reader, sender)?;
|
||||||
stdout_reader,
|
|
||||||
sender.clone(),
|
|
||||||
)?;
|
|
||||||
let mut test_stderr =
|
|
||||||
TestStream::new(id, TestStdioStream::Stderr, stderr_reader, sender)?;
|
|
||||||
|
|
||||||
// This ensures that the stdout and stderr streams in the select! loop below cannot starve each
|
// This ensures that the stdout and stderr streams in the select! loop below cannot starve each
|
||||||
// other.
|
// other.
|
||||||
@ -488,7 +479,7 @@ mod tests {
|
|||||||
let mut count = 0;
|
let mut count = 0;
|
||||||
for message in messages {
|
for message in messages {
|
||||||
match message {
|
match message {
|
||||||
TestEvent::Output(_, vec) => {
|
TestEvent::Output(vec) => {
|
||||||
assert_eq!(vec[0], expected);
|
assert_eq!(vec[0], expected);
|
||||||
count += vec.len();
|
count += vec.len();
|
||||||
}
|
}
|
||||||
@ -619,7 +610,7 @@ mod tests {
|
|||||||
while let Some((_, message)) = receiver.recv().await {
|
while let Some((_, message)) = receiver.recv().await {
|
||||||
if i % 2 == 0 {
|
if i % 2 == 0 {
|
||||||
let expected_text = format!("{:08x}", i / 2).into_bytes();
|
let expected_text = format!("{:08x}", i / 2).into_bytes();
|
||||||
let TestEvent::Output(TestStdioStream::Stderr, text) = message else {
|
let TestEvent::Output(text) = message else {
|
||||||
panic!("Incorrect message: {message:?}");
|
panic!("Incorrect message: {message:?}");
|
||||||
};
|
};
|
||||||
assert_eq!(text, expected_text);
|
assert_eq!(text, expected_text);
|
||||||
@ -665,7 +656,7 @@ mod tests {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
drop(worker);
|
drop(worker);
|
||||||
let (_, message) = receiver.recv().await.unwrap();
|
let (_, message) = receiver.recv().await.unwrap();
|
||||||
let TestEvent::Output(TestStdioStream::Stderr, text) = message else {
|
let TestEvent::Output(text) = message else {
|
||||||
panic!("Incorrect message: {message:?}");
|
panic!("Incorrect message: {message:?}");
|
||||||
};
|
};
|
||||||
assert_eq!(text.as_slice(), b"hello");
|
assert_eq!(text.as_slice(), b"hello");
|
||||||
|
@ -454,7 +454,7 @@ pub enum TestEvent {
|
|||||||
Register(Arc<TestDescriptions>),
|
Register(Arc<TestDescriptions>),
|
||||||
Plan(TestPlan),
|
Plan(TestPlan),
|
||||||
Wait(usize),
|
Wait(usize),
|
||||||
Output(TestStdioStream, Vec<u8>),
|
Output(Vec<u8>),
|
||||||
Slow(usize, u64),
|
Slow(usize, u64),
|
||||||
Result(usize, TestResult, u64),
|
Result(usize, TestResult, u64),
|
||||||
UncaughtError(String, Box<JsError>),
|
UncaughtError(String, Box<JsError>),
|
||||||
@ -1491,7 +1491,7 @@ pub async fn report_tests(
|
|||||||
reporter.report_wait(tests.get(&id).unwrap());
|
reporter.report_wait(tests.get(&id).unwrap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TestEvent::Output(_, output) => {
|
TestEvent::Output(output) => {
|
||||||
reporter.report_output(&output);
|
reporter.report_output(&output);
|
||||||
}
|
}
|
||||||
TestEvent::Slow(id, elapsed) => {
|
TestEvent::Slow(id, elapsed) => {
|
||||||
|
@ -278,7 +278,9 @@ where
|
|||||||
deno_core::unsync::spawn(async move {
|
deno_core::unsync::spawn(async move {
|
||||||
loop {
|
loop {
|
||||||
let received_changed_paths = watcher_receiver.recv().await;
|
let received_changed_paths = watcher_receiver.recv().await;
|
||||||
*changed_paths_.borrow_mut() = received_changed_paths.clone();
|
changed_paths_
|
||||||
|
.borrow_mut()
|
||||||
|
.clone_from(&received_changed_paths);
|
||||||
|
|
||||||
match *watcher_.restart_mode.lock() {
|
match *watcher_.restart_mode.lock() {
|
||||||
WatcherRestartMode::Automatic => {
|
WatcherRestartMode::Automatic => {
|
||||||
|
@ -102,7 +102,6 @@ pub type CreateCoverageCollectorCb = Box<
|
|||||||
pub struct CliMainWorkerOptions {
|
pub struct CliMainWorkerOptions {
|
||||||
pub argv: Vec<String>,
|
pub argv: Vec<String>,
|
||||||
pub log_level: WorkerLogLevel,
|
pub log_level: WorkerLogLevel,
|
||||||
pub coverage_dir: Option<String>,
|
|
||||||
pub enable_op_summary_metrics: bool,
|
pub enable_op_summary_metrics: bool,
|
||||||
pub enable_testing_features: bool,
|
pub enable_testing_features: bool,
|
||||||
pub has_node_modules_dir: bool,
|
pub has_node_modules_dir: bool,
|
||||||
|
@ -8,7 +8,7 @@ use libffi::middle::Arg;
|
|||||||
use std::ffi::c_void;
|
use std::ffi::c_void;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
pub struct OutBuffer(pub *mut u8, pub usize);
|
pub struct OutBuffer(pub *mut u8);
|
||||||
|
|
||||||
// SAFETY: OutBuffer is allocated by us in 00_ffi.js and is guaranteed to be
|
// SAFETY: OutBuffer is allocated by us in 00_ffi.js and is guaranteed to be
|
||||||
// only used for the purpose of writing return value of structs.
|
// only used for the purpose of writing return value of structs.
|
||||||
@ -23,9 +23,8 @@ pub fn out_buffer_as_ptr(
|
|||||||
match out_buffer {
|
match out_buffer {
|
||||||
Some(out_buffer) => {
|
Some(out_buffer) => {
|
||||||
let ab = out_buffer.buffer(scope).unwrap();
|
let ab = out_buffer.buffer(scope).unwrap();
|
||||||
let len = ab.byte_length();
|
|
||||||
ab.data()
|
ab.data()
|
||||||
.map(|non_null| OutBuffer(non_null.as_ptr() as *mut u8, len))
|
.map(|non_null| OutBuffer(non_null.as_ptr() as *mut u8))
|
||||||
}
|
}
|
||||||
None => None,
|
None => None,
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ fn canonicalize_path(path: &Path) -> Result<PathBuf, AnyError> {
|
|||||||
} else {
|
} else {
|
||||||
names_stack.push(path.to_str().unwrap().to_string());
|
names_stack.push(path.to_str().unwrap().to_string());
|
||||||
let current_dir = current_dir()?;
|
let current_dir = current_dir()?;
|
||||||
path = current_dir.clone();
|
path.clone_from(¤t_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(err) => return Err(err.into()),
|
Err(err) => return Err(err.into()),
|
||||||
|
@ -1424,6 +1424,7 @@ pub const EC_OID: const_oid::ObjectIdentifier =
|
|||||||
// }
|
// }
|
||||||
pub struct PssPrivateKeyParameters<'a> {
|
pub struct PssPrivateKeyParameters<'a> {
|
||||||
pub hash_algorithm: rsa::pkcs8::AlgorithmIdentifierRef<'a>,
|
pub hash_algorithm: rsa::pkcs8::AlgorithmIdentifierRef<'a>,
|
||||||
|
#[allow(dead_code)]
|
||||||
pub mask_gen_algorithm: rsa::pkcs8::AlgorithmIdentifierRef<'a>,
|
pub mask_gen_algorithm: rsa::pkcs8::AlgorithmIdentifierRef<'a>,
|
||||||
pub salt_length: u32,
|
pub salt_length: u32,
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,9 @@ pub fn op_node_x509_parse<'s>(
|
|||||||
_buf: buf.to_vec(),
|
_buf: buf.to_vec(),
|
||||||
// SAFETY: Extending the lifetime of the certificate. Backing buffer is
|
// SAFETY: Extending the lifetime of the certificate. Backing buffer is
|
||||||
// owned by the resource.
|
// owned by the resource.
|
||||||
cert: unsafe { std::mem::transmute(cert) },
|
cert: unsafe {
|
||||||
|
std::mem::transmute::<X509Certificate<'_>, X509Certificate<'_>>(cert)
|
||||||
|
},
|
||||||
pem,
|
pem,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ pub fn cpu_info() -> Option<Vec<CpuInfo>> {
|
|||||||
|
|
||||||
cpu.times.irq = 0;
|
cpu.times.irq = 0;
|
||||||
|
|
||||||
cpu.model = model.clone();
|
cpu.model.clone_from(&model);
|
||||||
cpu.speed = cpu_speed / 1000000;
|
cpu.speed = cpu_speed / 1000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ use std::cell::RefCell;
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::usize;
|
|
||||||
|
|
||||||
use crate::blob::op_blob_create_object_url;
|
use crate::blob::op_blob_create_object_url;
|
||||||
use crate::blob::op_blob_create_part;
|
use crate::blob::op_blob_create_part;
|
||||||
|
@ -592,7 +592,7 @@ impl<T: Descriptor + Hash> UnaryPermission<T> {
|
|||||||
|
|
||||||
match flag {
|
match flag {
|
||||||
ChildUnaryPermissionArg::Inherit => {
|
ChildUnaryPermissionArg::Inherit => {
|
||||||
perms = self.clone();
|
perms.clone_from(self);
|
||||||
}
|
}
|
||||||
ChildUnaryPermissionArg::Granted => {
|
ChildUnaryPermissionArg::Granted => {
|
||||||
if self.check_all_api(None).is_err() {
|
if self.check_all_api(None).is_err() {
|
||||||
@ -615,10 +615,12 @@ impl<T: Descriptor + Hash> UnaryPermission<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
perms.flag_denied_global = self.flag_denied_global;
|
perms.flag_denied_global = self.flag_denied_global;
|
||||||
perms.flag_denied_list = self.flag_denied_list.clone();
|
|
||||||
perms.prompt_denied_global = self.prompt_denied_global;
|
perms.prompt_denied_global = self.prompt_denied_global;
|
||||||
perms.prompt_denied_list = self.prompt_denied_list.clone();
|
|
||||||
perms.prompt = self.prompt;
|
perms.prompt = self.prompt;
|
||||||
|
perms.flag_denied_list.clone_from(&self.flag_denied_list);
|
||||||
|
perms
|
||||||
|
.prompt_denied_list
|
||||||
|
.clone_from(&self.prompt_denied_list);
|
||||||
|
|
||||||
Ok(perms)
|
Ok(perms)
|
||||||
}
|
}
|
||||||
@ -864,11 +866,11 @@ impl From<PathBuf> for RunDescriptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToString for RunDescriptor {
|
impl std::fmt::Display for RunDescriptor {
|
||||||
fn to_string(&self) -> String {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
RunDescriptor::Name(s) => s.clone(),
|
RunDescriptor::Name(s) => f.write_str(s),
|
||||||
RunDescriptor::Path(p) => p.to_string_lossy().to_string(),
|
RunDescriptor::Path(p) => f.write_str(&p.display().to_string()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.77.2"
|
channel = "1.79.0"
|
||||||
components = ["rustfmt", "clippy"]
|
components = ["rustfmt", "clippy"]
|
||||||
|
@ -9534,8 +9534,6 @@ fn lsp_untitled_file_diagnostics() {
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct PerformanceAverage {
|
pub struct PerformanceAverage {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub count: u32,
|
|
||||||
pub average_duration: u32,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
|
Loading…
Reference in New Issue
Block a user