]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/issue-3038.rs
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / tools / rustfmt / tests / target / issue-3038.rs
1 impl HTMLTableElement {
2     fn func() {
3         if number_of_row_elements == 0 {
4             if let Some(last_tbody) = node
5                 .rev_children()
6                 .filter_map(DomRoot::downcast::<Element>)
7                 .find(|n| {
8                     n.is::<HTMLTableSectionElement>() && n.local_name() == &local_name!("tbody")
9                 })
10             {
11                 last_tbody
12                     .upcast::<Node>()
13                     .AppendChild(new_row.upcast::<Node>())
14                     .expect("InsertRow failed to append first row.");
15             }
16         }
17
18         if number_of_row_elements == 0 {
19             if let Some(last_tbody) = node.find(|n| {
20                 n.is::<HTMLTableSectionElement>() && n.local_name() == &local_name!("tbody")
21             }) {
22                 last_tbody
23                     .upcast::<Node>()
24                     .AppendChild(new_row.upcast::<Node>())
25                     .expect("InsertRow failed to append first row.");
26             }
27         }
28     }
29 }