```rust
let p = node.parent_node().expect("Text node should have its parent");
```
And then we don't need this match.