Replace static with const in two places

This commit is contained in:
Laurenz 2022-05-25 21:23:12 +02:00
parent 30fdba4356
commit b6b6e36924
2 changed files with 3 additions and 3 deletions

View File

@ -259,7 +259,7 @@ impl Face {
// - The slices's location is stable in memory: // - The slices's location is stable in memory:
// - We don't move the underlying vector // - We don't move the underlying vector
// - Nobody else can move it since we have a strong ref to the `Arc`. // - Nobody else can move it since we have a strong ref to the `Arc`.
// - The internal static lifetime is not leaked because its rewritten // - The internal 'static lifetime is not leaked because its rewritten
// to the self-lifetime in `ttf()`. // to the self-lifetime in `ttf()`.
let slice: &'static [u8] = let slice: &'static [u8] =
unsafe { std::slice::from_raw_parts(buffer.as_ptr(), buffer.len()) }; unsafe { std::slice::from_raw_parts(buffer.as_ptr(), buffer.len()) };

View File

@ -116,7 +116,7 @@ impl Numbering {
} }
} }
static ROMANS: &'static [(&'static str, usize)] = &[ const ROMANS: &[(&str, usize)] = &[
("", 1000000), ("", 1000000),
("", 500000), ("", 500000),
("", 100000), ("", 100000),
@ -139,4 +139,4 @@ static ROMANS: &'static [(&'static str, usize)] = &[
("I", 1), ("I", 1),
]; ];
static SYMBOLS: &'static [char] = &['*', '†', '‡', '§', '‖', '¶']; const SYMBOLS: &[char] = &['*', '†', '‡', '§', '‖', '¶'];