mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
chore: update Rust to 1.68.0 (#18102)
This commit is contained in:
parent
09de6a11d6
commit
566db8921b
8 changed files with 13 additions and 26 deletions
|
@ -261,19 +261,14 @@ impl TestOptions {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[derive(Clone, Default, Debug)]
|
||||
pub enum LintReporterKind {
|
||||
#[default]
|
||||
Pretty,
|
||||
Json,
|
||||
Compact,
|
||||
}
|
||||
|
||||
impl Default for LintReporterKind {
|
||||
fn default() -> Self {
|
||||
LintReporterKind::Pretty
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct LintOptions {
|
||||
pub rules: LintRulesConfig,
|
||||
|
|
|
@ -2408,14 +2408,14 @@ fn napi_set_element(
|
|||
fn napi_set_instance_data(
|
||||
env: *mut Env,
|
||||
data: *mut c_void,
|
||||
finalize_cb: napi_finalize,
|
||||
finalize_cb: Option<napi_finalize>,
|
||||
finalize_hint: *mut c_void,
|
||||
) -> Result {
|
||||
let env = &mut *(env as *mut Env);
|
||||
let shared = env.shared_mut();
|
||||
shared.instance_data = data;
|
||||
shared.data_finalize = if !(finalize_cb as *const c_void).is_null() {
|
||||
Some(finalize_cb)
|
||||
shared.data_finalize = if finalize_cb.is_some() {
|
||||
finalize_cb
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
|
@ -388,7 +388,6 @@ fn resolve_bin_entry_value<'a>(
|
|||
.as_object()
|
||||
.map(|o| {
|
||||
o.keys()
|
||||
.into_iter()
|
||||
.map(|k| format!(" * npm:{pkg_nv}/{k}"))
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
|
|
|
@ -672,7 +672,6 @@ fn abbreviate_test_error(js_error: &JsError) -> JsError {
|
|||
false
|
||||
}
|
||||
})
|
||||
.into_iter()
|
||||
.collect::<Vec<_>>();
|
||||
frames.reverse();
|
||||
js_error.frames = frames;
|
||||
|
|
|
@ -326,7 +326,7 @@ fn rss() -> usize {
|
|||
}
|
||||
for n in chars {
|
||||
idx += 1;
|
||||
if ('0'..='9').contains(&n) {
|
||||
if n.is_ascii_digit() {
|
||||
out *= 10;
|
||||
out += n as usize - '0' as usize;
|
||||
} else {
|
||||
|
|
|
@ -38,9 +38,12 @@ static DEBUG_LOG_ENABLED: Lazy<bool> =
|
|||
Lazy::new(|| log::log_enabled!(log::Level::Debug));
|
||||
|
||||
/// Tri-state value for storing permission state
|
||||
#[derive(Eq, PartialEq, Debug, Clone, Copy, Deserialize, PartialOrd)]
|
||||
#[derive(
|
||||
Eq, PartialEq, Default, Debug, Clone, Copy, Deserialize, PartialOrd,
|
||||
)]
|
||||
pub enum PermissionState {
|
||||
Granted = 0,
|
||||
#[default]
|
||||
Prompt = 1,
|
||||
Denied = 2,
|
||||
}
|
||||
|
@ -140,12 +143,6 @@ impl fmt::Display for PermissionState {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for PermissionState {
|
||||
fn default() -> Self {
|
||||
PermissionState::Prompt
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct UnitPermission {
|
||||
pub name: &'static str,
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.67.0"
|
||||
channel = "1.68.0"
|
||||
components = ["rustfmt", "clippy"]
|
||||
|
|
|
@ -344,16 +344,13 @@ async fn run_ws_close_server(addr: &SocketAddr) {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
enum SupportedHttpVersions {
|
||||
#[default]
|
||||
All,
|
||||
Http1Only,
|
||||
Http2Only,
|
||||
}
|
||||
impl Default for SupportedHttpVersions {
|
||||
fn default() -> SupportedHttpVersions {
|
||||
SupportedHttpVersions::All
|
||||
}
|
||||
}
|
||||
|
||||
async fn get_tls_config(
|
||||
cert: &str,
|
||||
|
|
Loading…
Reference in a new issue