Commit bf525e7
committed
perf: borrow owner_filename in build-import-analysis AddDeps (#9874)
`AddDeps` is constructed once per import, and `owner_filename: chunk.filename.to_string()` allocated an identical `String` on every iteration. `owner_filename` is only used for a `&str` equality check, so make the field a `&'a str` borrowing `chunk.filename` and drop the per-import allocation. No behavior change.1 parent 318db73 commit bf525e7
2 files changed
Lines changed: 2 additions & 2 deletions
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
0 commit comments