mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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
|
@ -591,10 +591,11 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn set_event_handler_common<T: CallbackContainer>(&self, ty: &str, listener: Option<Rc<T>>)
|
||||
where
|
||||
T: CallbackContainer,
|
||||
{
|
||||
pub fn set_event_handler_common<T: CallbackContainer>(
|
||||
&self,
|
||||
ty: &str,
|
||||
listener: Option<Rc<T>>,
|
||||
) {
|
||||
let cx = GlobalScope::get_cx();
|
||||
|
||||
let event_listener = listener.map(|listener| {
|
||||
|
@ -606,10 +607,7 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn set_error_event_handler<T: CallbackContainer>(&self, ty: &str, listener: Option<Rc<T>>)
|
||||
where
|
||||
T: CallbackContainer,
|
||||
{
|
||||
pub fn set_error_event_handler<T: CallbackContainer>(&self, ty: &str, listener: Option<Rc<T>>) {
|
||||
let cx = GlobalScope::get_cx();
|
||||
|
||||
let event_listener = listener.map(|listener| {
|
||||
|
@ -625,9 +623,7 @@ impl EventTarget {
|
|||
&self,
|
||||
ty: &str,
|
||||
listener: Option<Rc<T>>,
|
||||
) where
|
||||
T: CallbackContainer,
|
||||
{
|
||||
) {
|
||||
let cx = GlobalScope::get_cx();
|
||||
|
||||
let event_listener = listener.map(|listener| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue