mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
content: Replace uses of downcast
+is_some
/is_none
with is
(#33804)
* content: Replace uses of downcast+is_some/is_none with is Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Remove ! to return correct logic Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
c5899e596d
commit
27b25e869b
5 changed files with 5 additions and 8 deletions
|
@ -76,7 +76,7 @@ impl DOMMatrixMethods for DOMMatrix {
|
|||
}
|
||||
match init.unwrap() {
|
||||
StringOrUnrestrictedDoubleSequence::String(ref s) => {
|
||||
if global.downcast::<Window>().is_none() {
|
||||
if !global.is::<Window>() {
|
||||
return Err(error::Error::Type(
|
||||
"String constructor is only supported in the main thread.".to_owned(),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue