Review comment: make array const.

This commit is contained in:
Philip Daniels 2022-04-06 21:30:58 +01:00
parent 4e61787b5f
commit e26c0caaf2
1 changed files with 3 additions and 3 deletions

View File

@ -357,15 +357,15 @@ fn paint(&mut self, ctx: &mut PaintCtx, data: &LapceTabData, env: &Env) {
.get_color_unchecked(LapceTheme::EDITOR_BACKGROUND),
);
static SETTINGS_SECTIONS: [&str; 3] = ["Core Settings", "Editor Settings", "Keybindings"];
const SETTINGS_SECTIONS: [&str; 3] = ["Core Settings", "Editor Settings", "Keybindings"];
for (i, text) in SETTINGS_SECTIONS
.iter()
.into_iter()
.enumerate()
{
let text_layout = ctx
.text()
.new_text_layout(*text)
.new_text_layout(text)
.font(FontFamily::SYSTEM_UI, 14.0)
.text_color(
data.config