You could factor out the `match` to have just

```rust
let values = match decl_id { Some(decl_id) => svec!(...), None => svec!(...) };
self.check_and_record("function", span, sub_span, values);
```