mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix a bunch of warnings in script
(#32680)
This is just a portion of the errors that are remaining to be fixed.
This commit is contained in:
parent
93fdb8263d
commit
26624a109f
27 changed files with 150 additions and 113 deletions
|
@ -61,15 +61,10 @@ pub struct CallbackObject {
|
|||
incumbent: Option<Dom<GlobalScope>>,
|
||||
}
|
||||
|
||||
impl Default for CallbackObject {
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
fn default() -> CallbackObject {
|
||||
CallbackObject::new()
|
||||
}
|
||||
}
|
||||
|
||||
impl CallbackObject {
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
// These are used by the bindings and do not need `default()` functions.
|
||||
#[allow(clippy::new_without_default)]
|
||||
fn new() -> CallbackObject {
|
||||
CallbackObject {
|
||||
callback: Heap::default(),
|
||||
|
@ -140,6 +135,8 @@ pub struct CallbackFunction {
|
|||
impl CallbackFunction {
|
||||
/// Create a new `CallbackFunction` for this object.
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
// These are used by the bindings and do not need `default()` functions.
|
||||
#[allow(clippy::new_without_default)]
|
||||
pub fn new() -> CallbackFunction {
|
||||
CallbackFunction {
|
||||
object: CallbackObject::new(),
|
||||
|
@ -167,6 +164,8 @@ pub struct CallbackInterface {
|
|||
|
||||
impl CallbackInterface {
|
||||
/// Create a new CallbackInterface object for the given `JSObject`.
|
||||
// These are used by the bindings and do not need `default()` functions.
|
||||
#[allow(clippy::new_without_default)]
|
||||
pub fn new() -> CallbackInterface {
|
||||
CallbackInterface {
|
||||
object: CallbackObject::new(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue