Commit 6e3e33e
authored
When a downstream crate enables the `subtle` feature in `hybrid-array`,
the crate would fail to compile:
```
src/algorithms/pss.rs:375:31
|
375 | if (salt_valid & h0.ct_eq(h)).into() {
| ----- ^ expected `&Array<u8, ...>`, found `&mut [u8]`
| |
| arguments to this method are incorrect
|
= note: expected reference `&Array<u8, <D as OutputSizeUser>::OutputSize>`
found mutable reference `&mut [u8]`
```
This is because the `hybrid_array::Array` was automatically deref'ed to
a slice. Now `Array` implements `subtle::ConstantTimeEq` that automatic
deref no longer happens.
This commit fixes that by converting one of the arguments of the
conversion that brings back the auto-deref.
Thanks to @tarcieri for the help debugging:
RustCrypto/formats#2049 (comment)
1 parent bb0468e commit 6e3e33e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
0 commit comments