mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
clippy: Fix from_over_into
warnings (#31946)
This commit is contained in:
parent
e3d6b66d5f
commit
a7ad92d9a3
4 changed files with 24 additions and 24 deletions
|
@ -3454,10 +3454,10 @@ impl UniqueId {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<LayoutNodeType> for NodeTypeId {
|
||||
impl From<NodeTypeId> for LayoutNodeType {
|
||||
#[inline(always)]
|
||||
fn into(self) -> LayoutNodeType {
|
||||
match self {
|
||||
fn from(node_type: NodeTypeId) -> LayoutNodeType {
|
||||
match node_type {
|
||||
NodeTypeId::Element(e) => LayoutNodeType::Element(e.into()),
|
||||
NodeTypeId::CharacterData(CharacterDataTypeId::Text(_)) => LayoutNodeType::Text,
|
||||
x => unreachable!("Layout should not traverse nodes of type {:?}", x),
|
||||
|
@ -3465,10 +3465,10 @@ impl Into<LayoutNodeType> for NodeTypeId {
|
|||
}
|
||||
}
|
||||
|
||||
impl Into<LayoutElementType> for ElementTypeId {
|
||||
impl From<ElementTypeId> for LayoutElementType {
|
||||
#[inline(always)]
|
||||
fn into(self) -> LayoutElementType {
|
||||
match self {
|
||||
fn from(element_type: ElementTypeId) -> LayoutElementType {
|
||||
match element_type {
|
||||
ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLBodyElement) => {
|
||||
LayoutElementType::HTMLBodyElement
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue