Could be

```rust
do path.filename().chain |filename| {
   match filename { ~"lib.rs" => Some(&mut self.libs), ... }
}
```

but that's not necessary.