Commit ac655bbd authored by David Brown's avatar David Brown Committed by David Brown
Browse files

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: default avatarDavid Brown <david.brown@linaro.org>
parent 0bd8c6bf
Loading
Loading
Loading
Loading
+1 −4
Changes for sim/src/image.rs: 1 added line, 4 removed lines.
Original line number Diff line number Diff line
@@ -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() {