mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
fix many clippy warnings (#33510)
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
4e4b137eaa
commit
f986160ed4
13 changed files with 29 additions and 34 deletions
|
@ -96,7 +96,7 @@ impl GamepadHapticActuator {
|
|||
}
|
||||
Self {
|
||||
reflector_: Reflector::new(),
|
||||
gamepad_index: gamepad_index,
|
||||
gamepad_index,
|
||||
effects,
|
||||
playing_effect_promise: DomRefCell::new(None),
|
||||
sequence_id: Cell::new(0),
|
||||
|
|
|
@ -7,7 +7,7 @@ use std::collections::HashSet;
|
|||
use std::default::Default;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{char, i32, mem};
|
||||
use std::{char, mem};
|
||||
|
||||
use app_units::{Au, AU_PER_PX};
|
||||
use base::id::PipelineId;
|
||||
|
|
|
@ -656,9 +656,7 @@ impl LinkProcessingOptions {
|
|||
assert!(!self.href.is_empty());
|
||||
|
||||
// Step 2. If options's destination is null, then return null.
|
||||
let Some(destination) = self.destination else {
|
||||
return None;
|
||||
};
|
||||
let destination = self.destination?;
|
||||
|
||||
// Step 3. Let url be the result of encoding-parsing a URL given options's href, relative to options's base URL.
|
||||
// TODO: The spec passes a base url which is incompatible with the
|
||||
|
|
|
@ -478,7 +478,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
|
|||
let name_str = name.as_str().ok_or(Error::Syntax)?;
|
||||
|
||||
// Step 5: If (name, value) is a forbidden request-header, then return.
|
||||
if is_forbidden_request_header(name_str, &value) {
|
||||
if is_forbidden_request_header(name_str, value) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
|
@ -114,11 +114,9 @@ impl XRReferenceSpaceEventMethods for XRReferenceSpaceEvent {
|
|||
|
||||
/// <https://www.w3.org/TR/webxr/#dom-xrreferencespaceevent-transform>
|
||||
fn GetTransform(&self) -> Option<DomRoot<XRRigidTransform>> {
|
||||
if let Some(ref transform) = self.transform {
|
||||
Some(DomRoot::from_ref(&**transform))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
self.transform
|
||||
.as_ref()
|
||||
.map(|transform| DomRoot::from_ref(&**transform))
|
||||
}
|
||||
|
||||
/// <https://dom.spec.whatwg.org/#dom-event-istrusted>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue