Commit 6f19267
committed
Keep showing debug representation of paths in gitoxide-core
Where this was done already, in `bail!` and `anyhow!`.
A newly enforced clippy lint warns about this, making the good
point that the debug representation can change in the future. But
the display representation it recommends using is less suitable in
these places, because it can result in more ambiguous output due to
the absence of quoting and escaping.
(In some cases, it seems like the display representation could
slightly exacerbate CVE-2024-43785 / #1534, but using the debug
representation on these two macro calls is peripheral to the cases
of greatest concern, and this doesn't really mitigate that.)
The clippy lint being suppressed here in two specific places is:
https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_debug_formatting1 parent f4c37c0 commit 6f19267
File tree
2 files changed
+2
-0
lines changed- gitoxide-core/src/repository
- attributes
- index
2 files changed
+2
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
0 commit comments