Replace static with const in two places
This commit is contained in:
parent
30fdba4356
commit
b6b6e36924
@ -259,7 +259,7 @@ impl Face {
|
||||
// - The slices's location is stable in memory:
|
||||
// - We don't move the underlying vector
|
||||
// - 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()`.
|
||||
let slice: &'static [u8] =
|
||||
unsafe { std::slice::from_raw_parts(buffer.as_ptr(), buffer.len()) };
|
||||
|
@ -116,7 +116,7 @@ impl Numbering {
|
||||
}
|
||||
}
|
||||
|
||||
static ROMANS: &'static [(&'static str, usize)] = &[
|
||||
const ROMANS: &[(&str, usize)] = &[
|
||||
("M̅", 1000000),
|
||||
("D̅", 500000),
|
||||
("C̅", 100000),
|
||||
@ -139,4 +139,4 @@ static ROMANS: &'static [(&'static str, usize)] = &[
|
||||
("I", 1),
|
||||
];
|
||||
|
||||
static SYMBOLS: &'static [char] = &['*', '†', '‡', '§', '‖', '¶'];
|
||||
const SYMBOLS: &[char] = &['*', '†', '‡', '§', '‖', '¶'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user