mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
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:
|
// - 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()) };
|
||||||
|
@ -116,7 +116,7 @@ impl Numbering {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static ROMANS: &'static [(&'static str, usize)] = &[
|
const ROMANS: &[(&str, usize)] = &[
|
||||||
("M̅", 1000000),
|
("M̅", 1000000),
|
||||||
("D̅", 500000),
|
("D̅", 500000),
|
||||||
("C̅", 100000),
|
("C̅", 100000),
|
||||||
@ -139,4 +139,4 @@ static ROMANS: &'static [(&'static str, usize)] = &[
|
|||||||
("I", 1),
|
("I", 1),
|
||||||
];
|
];
|
||||||
|
|
||||||
static SYMBOLS: &'static [char] = &['*', '†', '‡', '§', '‖', '¶'];
|
const SYMBOLS: &[char] = &['*', '†', '‡', '§', '‖', '¶'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user