Commit 172efc9
authored
secrecy: have
Adds a `fmt::Formatter` argument to `DebugSecret::debug_secret`, making
it into a full-fledged equivalent of `Debug::fmt`, but without a `&self`
parameter which thereby ensures that there is no way to expose the
underlying secret value.
This makes it possible to change the default impl to use the recently
added `any::type_name` in order to display the *type* of the secret in
the debug message.DebugSecret take a formatter (#467)1 parent d913267 commit 172efc9
1 file changed
+14
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
155 | 158 | | |
156 | 159 | | |
157 | 160 | | |
158 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
159 | 164 | | |
160 | 165 | | |
161 | 166 | | |
| |||
197 | 202 | | |
198 | 203 | | |
199 | 204 | | |
200 | | - | |
| 205 | + | |
201 | 206 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
| |||
0 commit comments