Compilation error E0716 in Rust 1.74 #5633
-
|
Hello! I ran into this problem while compiling latest pyca cryptography main branch with PR 13740: pyca/cryptography#13740 Looks like it is specific to Rust 1.74, there is no such problems with Rust 1.83. Please advise how this problem could be solved with Rust 1.74? I really wouldn't like using unsafe static mut approach. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I think something like this will work: let algo_owned;
let algorithm = if algorithm.is_instance(&types::NO_DIGEST_INFO.get(py)?)? {
algo_owned = pyo3::types::PyNone::get(py).to_owned().into_any();
&algo_owned
} else {
algorithm
}; |
Beta Was this translation helpful? Give feedback.
I think something like this will work: