Use workspace definitions for all crates and update to the 2021 edition (#32544)

This commit is contained in:
Martin Robinson 2024-06-18 11:22:08 +02:00 committed by GitHub
parent 42b09d483f
commit 4a7f3bac7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 283 additions and 268 deletions

View file

@ -1,12 +1,11 @@
[package]
name = "script"
version = "0.0.1"
authors = ["The Servo Project Developers"]
license = "MPL-2.0"
edition = "2018"
publish = false
build = "build.rs"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
[lib]
name = "script"

View file

@ -116,8 +116,12 @@ unsafe extern "C" fn off_thread_compilation_callback(
let cx = GlobalScope::get_cx();
let _ar = enter_realm(&*global);
let compiled_script = FinishOffThreadStencil(*cx, token.0, ptr::null_mut());
// TODO: This is necessary because the rust compiler will otherwise try to move the *mut
// OffThreadToken directly, which isn't marked as Send. The correct fix is that this
// type is marked as Send in mozjs.
let used_token = token;
let compiled_script = FinishOffThreadStencil(*cx, used_token.0, ptr::null_mut());
let load = if compiled_script.is_null() {
Err(NoTrace(NetworkError::Internal(
"Off-thread compilation failed.".into(),

View file

@ -157,7 +157,7 @@ macro_rules! make_labels_getter(
#[macro_export]
macro_rules! make_enumerated_getter(
( $attr:ident, $htmlname:tt, $default:expr, $($choices: pat)|+) => (
( $attr:ident, $htmlname:tt, $default:expr, $($choices:pat_param)|+) => (
fn $attr(&self) -> DOMString {
use $crate::dom::bindings::inheritance::Castable;
use $crate::dom::element::Element;