Fixed some clippy warnings in components (#32025)

* Fixed some clippy warnings in components

* Updated the simplification of bolean expressions in componets/script/dom/range.rs
This commit is contained in:
komuhangi 2024-04-10 10:50:01 +03:00 committed by GitHub
parent 245269c649
commit 89a4820519
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 18 deletions

View file

@ -84,9 +84,9 @@ impl RTCIceCandidate {
config: &RTCIceCandidateInit,
) -> Fallible<DomRoot<RTCIceCandidate>> {
if config.sdpMid.is_none() && config.sdpMLineIndex.is_none() {
return Err(Error::Type(format!(
"one of sdpMid and sdpMLineIndex must be set"
)));
return Err(Error::Type(
"one of sdpMid and sdpMLineIndex must be set".to_string(),
));
}
Ok(RTCIceCandidate::new_with_proto(
&window.global(),