sim: Remove extraneous static
According to clippy, `&'static` can just be `&` for static definitions, which always have a static lifetime. Clean this up in the arrays in the code, as well as generation code in imgtool. Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
parent
91de33d9f7
commit
1997f539f7
|
@ -31,7 +31,7 @@ class KeyClass(object):
|
||||||
|
|
||||||
def emit_rust_public(self, file=sys.stdout):
|
def emit_rust_public(self, file=sys.stdout):
|
||||||
self._emit(
|
self._emit(
|
||||||
header="static {}_PUB_KEY: &'static [u8] = &[".format(self.shortname().upper()),
|
header="static {}_PUB_KEY: &[u8] = &[".format(self.shortname().upper()),
|
||||||
trailer="];",
|
trailer="];",
|
||||||
encoded_bytes=self.get_public_bytes(),
|
encoded_bytes=self.get_public_bytes(),
|
||||||
indent=" ",
|
indent=" ",
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
use crate::area::AreaDesc;
|
use crate::area::AreaDesc;
|
||||||
use simflash::SimMultiFlash;
|
use simflash::SimMultiFlash;
|
||||||
use libc;
|
|
||||||
use crate::api;
|
use crate::api;
|
||||||
|
|
||||||
/// Invoke the bootloader on this flash device.
|
/// Invoke the bootloader on this flash device.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
static ECDSA256_PUB_KEY: &'static [u8] = &[
|
static ECDSA256_PUB_KEY: &[u8] = &[
|
||||||
0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
|
0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86,
|
||||||
0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
|
0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a,
|
||||||
0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
|
0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
static ED25519_PUB_KEY: &'static [u8] = &[
|
static ED25519_PUB_KEY: &[u8] = &[
|
||||||
0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65,
|
0x30, 0x2a, 0x30, 0x05, 0x06, 0x03, 0x2b, 0x65,
|
||||||
0x70, 0x03, 0x21, 0x00, 0xd4, 0xb3, 0x1b, 0xa4,
|
0x70, 0x03, 0x21, 0x00, 0xd4, 0xb3, 0x1b, 0xa4,
|
||||||
0x9a, 0x3a, 0xdd, 0x3f, 0x82, 0x5d, 0x10, 0xca,
|
0x9a, 0x3a, 0xdd, 0x3f, 0x82, 0x5d, 0x10, 0xca,
|
||||||
|
|
|
@ -33,7 +33,7 @@ pub use crate::{
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const USAGE: &'static str = "
|
const USAGE: &str = "
|
||||||
Mcuboot simulator
|
Mcuboot simulator
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
@ -67,7 +67,7 @@ pub enum DeviceName {
|
||||||
Nrf52840UnequalSlots,
|
Nrf52840UnequalSlots,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static ALL_DEVICES: &'static [DeviceName] = &[
|
pub static ALL_DEVICES: &[DeviceName] = &[
|
||||||
DeviceName::Stm32f4,
|
DeviceName::Stm32f4,
|
||||||
DeviceName::K64f,
|
DeviceName::K64f,
|
||||||
DeviceName::K64fBig,
|
DeviceName::K64fBig,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Autogenerated by imgtool.py, do not edit. */
|
/* Autogenerated by imgtool.py, do not edit. */
|
||||||
static RSA3072_PUB_KEY: &'static [u8] = &[
|
static RSA3072_PUB_KEY: &[u8] = &[
|
||||||
0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81,
|
0x30, 0x82, 0x01, 0x8a, 0x02, 0x82, 0x01, 0x81,
|
||||||
0x00, 0xb4, 0x2c, 0x0e, 0x98, 0x58, 0x10, 0xa4,
|
0x00, 0xb4, 0x2c, 0x0e, 0x98, 0x58, 0x10, 0xa4,
|
||||||
0xa7, 0x58, 0x99, 0x7c, 0x01, 0xdd, 0x08, 0x2a,
|
0xa7, 0x58, 0x99, 0x7c, 0x01, 0xdd, 0x08, 0x2a,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Autogenerated by imgtool.py, do not edit. */
|
/* Autogenerated by imgtool.py, do not edit. */
|
||||||
static RSA_PUB_KEY: &'static [u8] = &[
|
static RSA_PUB_KEY: &[u8] = &[
|
||||||
0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01,
|
0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01,
|
||||||
0x00, 0xd1, 0x06, 0x08, 0x1a, 0x18, 0x44, 0x2c,
|
0x00, 0xd1, 0x06, 0x08, 0x1a, 0x18, 0x44, 0x2c,
|
||||||
0x18, 0xe8, 0xfb, 0xfd, 0xf7, 0x0d, 0xa3, 0x4f,
|
0x18, 0xe8, 0xfb, 0xfd, 0xf7, 0x0d, 0xa3, 0x4f,
|
||||||
|
|
Loading…
Reference in New Issue