From 8731d157be4e49713587325f29099579d637a06a Mon Sep 17 00:00:00 2001 From: Integral Date: Tue, 10 Dec 2024 06:04:43 +0800 Subject: Remove unnecessary statics --- alacritty/src/display/window.rs | 2 +- alacritty/src/renderer/rects.rs | 4 ++-- alacritty/src/renderer/text/gles2.rs | 4 ++-- alacritty/src/renderer/text/glsl3.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs index 1f1e7402..1c8089bc 100644 --- a/alacritty/src/display/window.rs +++ b/alacritty/src/display/window.rs @@ -44,7 +44,7 @@ use crate::display::SizeInfo; /// Window icon for `_NET_WM_ICON` property. #[cfg(all(feature = "x11", not(any(target_os = "macos", windows))))] -static WINDOW_ICON: &[u8] = include_bytes!("../../extra/logo/compat/alacritty-term.png"); +const WINDOW_ICON: &[u8] = include_bytes!("../../extra/logo/compat/alacritty-term.png"); /// This should match the definition of IDI_ICON from `alacritty.rc`. #[cfg(windows)] diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs index ca2d1852..5ec2f1ef 100644 --- a/alacritty/src/renderer/rects.rs +++ b/alacritty/src/renderer/rects.rs @@ -228,8 +228,8 @@ impl RenderLines { } /// Shader sources for rect rendering program. -static RECT_SHADER_F: &str = include_str!("../../res/rect.f.glsl"); -static RECT_SHADER_V: &str = include_str!("../../res/rect.v.glsl"); +const RECT_SHADER_F: &str = include_str!("../../res/rect.f.glsl"); +const RECT_SHADER_V: &str = include_str!("../../res/rect.v.glsl"); #[repr(C)] #[derive(Debug, Clone, Copy)] diff --git a/alacritty/src/renderer/text/gles2.rs b/alacritty/src/renderer/text/gles2.rs index 8756ea80..f14fa7ba 100644 --- a/alacritty/src/renderer/text/gles2.rs +++ b/alacritty/src/renderer/text/gles2.rs @@ -20,8 +20,8 @@ use super::{ }; // Shader source. -static TEXT_SHADER_F: &str = include_str!("../../../res/gles2/text.f.glsl"); -static TEXT_SHADER_V: &str = include_str!("../../../res/gles2/text.v.glsl"); +const TEXT_SHADER_F: &str = include_str!("../../../res/gles2/text.f.glsl"); +const TEXT_SHADER_V: &str = include_str!("../../../res/gles2/text.v.glsl"); #[derive(Debug)] pub struct Gles2Renderer { diff --git a/alacritty/src/renderer/text/glsl3.rs b/alacritty/src/renderer/text/glsl3.rs index fee95ce3..8cf06784 100644 --- a/alacritty/src/renderer/text/glsl3.rs +++ b/alacritty/src/renderer/text/glsl3.rs @@ -20,8 +20,8 @@ use super::{ }; // Shader source. -pub static TEXT_SHADER_F: &str = include_str!("../../../res/glsl3/text.f.glsl"); -static TEXT_SHADER_V: &str = include_str!("../../../res/glsl3/text.v.glsl"); +pub const TEXT_SHADER_F: &str = include_str!("../../../res/glsl3/text.f.glsl"); +const TEXT_SHADER_V: &str = include_str!("../../../res/glsl3/text.v.glsl"); /// Maximum items to be drawn in a batch. const BATCH_MAX: usize = 0x1_0000; -- cgit v1.2.3-54-g00ecf