mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
cargo: Bump rustc to 1.89 (#36818)
Update Rustc to 1.89. Reviewable by commit. Leftover work: - #37330 - #38777 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
8587536755
commit
3225d19907
126 changed files with 408 additions and 610 deletions
|
@ -355,15 +355,15 @@ impl Element {
|
|||
)
|
||||
}
|
||||
|
||||
fn rare_data(&self) -> Ref<Option<Box<ElementRareData>>> {
|
||||
fn rare_data(&self) -> Ref<'_, Option<Box<ElementRareData>>> {
|
||||
self.rare_data.borrow()
|
||||
}
|
||||
|
||||
fn rare_data_mut(&self) -> RefMut<Option<Box<ElementRareData>>> {
|
||||
fn rare_data_mut(&self) -> RefMut<'_, Option<Box<ElementRareData>>> {
|
||||
self.rare_data.borrow_mut()
|
||||
}
|
||||
|
||||
fn ensure_rare_data(&self) -> RefMut<Box<ElementRareData>> {
|
||||
fn ensure_rare_data(&self) -> RefMut<'_, Box<ElementRareData>> {
|
||||
let mut rare_data = self.rare_data.borrow_mut();
|
||||
if rare_data.is_none() {
|
||||
*rare_data = Some(Default::default());
|
||||
|
@ -792,7 +792,7 @@ impl Element {
|
|||
/// Lazily initialize the raredata if it does not exist.
|
||||
pub(crate) fn registered_intersection_observers_mut(
|
||||
&self,
|
||||
) -> RefMut<Vec<IntersectionObserverRegistration>> {
|
||||
) -> RefMut<'_, Vec<IntersectionObserverRegistration>> {
|
||||
RefMut::map(self.ensure_rare_data(), |rare_data| {
|
||||
&mut rare_data.registered_intersection_observers
|
||||
})
|
||||
|
@ -800,8 +800,8 @@ impl Element {
|
|||
|
||||
pub(crate) fn registered_intersection_observers(
|
||||
&self,
|
||||
) -> Option<Ref<Vec<IntersectionObserverRegistration>>> {
|
||||
let rare_data: Ref<_> = self.rare_data.borrow();
|
||||
) -> Option<Ref<'_, Vec<IntersectionObserverRegistration>>> {
|
||||
let rare_data: Ref<'_, _> = self.rare_data.borrow();
|
||||
|
||||
if rare_data.is_none() {
|
||||
return None;
|
||||
|
@ -817,7 +817,7 @@ impl Element {
|
|||
pub(crate) fn get_intersection_observer_registration(
|
||||
&self,
|
||||
observer: &IntersectionObserver,
|
||||
) -> Option<Ref<IntersectionObserverRegistration>> {
|
||||
) -> Option<Ref<'_, IntersectionObserverRegistration>> {
|
||||
if let Some(registrations) = self.registered_intersection_observers() {
|
||||
registrations
|
||||
.iter()
|
||||
|
@ -868,8 +868,7 @@ impl Element {
|
|||
let mut parser_input = CssParserInput::new(media_query);
|
||||
let mut parser = CssParser::new(&mut parser_input);
|
||||
let media_list = MediaList::parse(&context, &mut parser);
|
||||
let result = media_list.evaluate(document.window().layout().device(), quirks_mode);
|
||||
result
|
||||
media_list.evaluate(document.window().layout().device(), quirks_mode)
|
||||
}
|
||||
|
||||
/// <https://drafts.csswg.org/cssom-view/#scroll-a-target-into-view>
|
||||
|
@ -992,7 +991,7 @@ impl Element {
|
|||
if let Some(style) = element.style() {
|
||||
let overflow_x = style.get_box().clone_overflow_x();
|
||||
let overflow_y = style.get_box().clone_overflow_y();
|
||||
return overflow_x.is_scrollable() || overflow_y.is_scrollable();
|
||||
overflow_x.is_scrollable() || overflow_y.is_scrollable()
|
||||
} else {
|
||||
false // Element without style is not a scrolling box
|
||||
}
|
||||
|
@ -1846,7 +1845,7 @@ impl Element {
|
|||
&self.namespace
|
||||
}
|
||||
|
||||
pub(crate) fn prefix(&self) -> Ref<Option<Prefix>> {
|
||||
pub(crate) fn prefix(&self) -> Ref<'_, Option<Prefix>> {
|
||||
self.prefix.borrow()
|
||||
}
|
||||
|
||||
|
@ -1854,7 +1853,7 @@ impl Element {
|
|||
*self.prefix.borrow_mut() = prefix;
|
||||
}
|
||||
|
||||
pub(crate) fn attrs(&self) -> Ref<[Dom<Attr>]> {
|
||||
pub(crate) fn attrs(&self) -> Ref<'_, [Dom<Attr>]> {
|
||||
Ref::map(self.attrs.borrow(), |attrs| &**attrs)
|
||||
}
|
||||
|
||||
|
@ -5216,7 +5215,7 @@ impl Element {
|
|||
|
||||
// https://html.spec.whatwg.org/multipage/#category-submit
|
||||
pub(crate) fn as_maybe_validatable(&self) -> Option<&dyn Validatable> {
|
||||
let element = match self.upcast::<Node>().type_id() {
|
||||
match self.upcast::<Node>().type_id() {
|
||||
NodeTypeId::Element(ElementTypeId::HTMLElement(
|
||||
HTMLElementTypeId::HTMLInputElement,
|
||||
)) => {
|
||||
|
@ -5260,8 +5259,7 @@ impl Element {
|
|||
Some(element as &dyn Validatable)
|
||||
},
|
||||
_ => None,
|
||||
};
|
||||
element
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn is_invalid(&self, needs_update: bool, can_gc: CanGc) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue