sim: Functionalize the code a bit
Instead of setting a mutable variable and possibly assigning to it, just set the variable to the result of the conditional. Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
parent
0bd8c6bf2a
commit
ac655bbddb
|
@ -1658,10 +1658,7 @@ fn make_tlv() -> TlvGen {
|
|||
if Caps::EcdsaP224.present() {
|
||||
panic!("Ecdsa P224 not supported in Simulator");
|
||||
}
|
||||
let mut aes_key_size = 128;
|
||||
if Caps::Aes256.present() {
|
||||
aes_key_size = 256;
|
||||
}
|
||||
let aes_key_size = if Caps::Aes256.present() { 256 } else { 128 };
|
||||
|
||||
if Caps::EncKw.present() {
|
||||
if Caps::RSA2048.present() {
|
||||
|
|
Loading…
Reference in New Issue