mirror of
https://github.com/alacritty/alacritty
synced 2024-10-14 19:53:00 +00:00
Fix redundant static lifetime clippy lint
This commit is contained in:
parent
a39459ece2
commit
4039f72000
|
@ -1420,7 +1420,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_control_attribute() {
|
fn parse_control_attribute() {
|
||||||
static BYTES: &'static [u8] = &[0x1b, 0x5b, 0x31, 0x6d];
|
static BYTES: &[u8] = &[0x1b, 0x5b, 0x31, 0x6d];
|
||||||
|
|
||||||
let mut parser = Processor::new();
|
let mut parser = Processor::new();
|
||||||
let mut handler = AttrHandler::default();
|
let mut handler = AttrHandler::default();
|
||||||
|
@ -1434,7 +1434,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_truecolor_attr() {
|
fn parse_truecolor_attr() {
|
||||||
static BYTES: &'static [u8] = &[
|
static BYTES: &[u8] = &[
|
||||||
0x1b, 0x5b, 0x33, 0x38, 0x3b, 0x32, 0x3b, 0x31, 0x32, 0x38, 0x3b, 0x36, 0x36, 0x3b,
|
0x1b, 0x5b, 0x33, 0x38, 0x3b, 0x32, 0x3b, 0x31, 0x32, 0x38, 0x3b, 0x36, 0x36, 0x3b,
|
||||||
0x32, 0x35, 0x35, 0x6d,
|
0x32, 0x35, 0x35, 0x6d,
|
||||||
];
|
];
|
||||||
|
@ -1454,7 +1454,7 @@ mod tests {
|
||||||
/// No exactly a test; useful for debugging
|
/// No exactly a test; useful for debugging
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_zsh_startup() {
|
fn parse_zsh_startup() {
|
||||||
static BYTES: &'static [u8] = &[
|
static BYTES: &[u8] = &[
|
||||||
0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x37, 0x6d, 0x25, 0x1b, 0x5b, 0x32, 0x37, 0x6d,
|
0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x37, 0x6d, 0x25, 0x1b, 0x5b, 0x32, 0x37, 0x6d,
|
||||||
0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x30, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
0x1b, 0x5b, 0x31, 0x6d, 0x1b, 0x5b, 0x30, 0x6d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||||
|
@ -1512,7 +1512,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_designate_g0_as_line_drawing() {
|
fn parse_designate_g0_as_line_drawing() {
|
||||||
static BYTES: &'static [u8] = &[0x1b, b'(', b'0'];
|
static BYTES: &[u8] = &[0x1b, b'(', b'0'];
|
||||||
let mut parser = Processor::new();
|
let mut parser = Processor::new();
|
||||||
let mut handler = CharsetHandler::default();
|
let mut handler = CharsetHandler::default();
|
||||||
|
|
||||||
|
@ -1526,7 +1526,7 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_designate_g1_as_line_drawing_and_invoke() {
|
fn parse_designate_g1_as_line_drawing_and_invoke() {
|
||||||
static BYTES: &'static [u8] = &[0x1b, 0x29, 0x30, 0x0e];
|
static BYTES: &[u8] = &[0x1b, 0x29, 0x30, 0x0e];
|
||||||
let mut parser = Processor::new();
|
let mut parser = Processor::new();
|
||||||
let mut handler = CharsetHandler::default();
|
let mut handler = CharsetHandler::default();
|
||||||
|
|
||||||
|
|
|
@ -727,7 +727,7 @@ impl<'a> Deserialize<'a> for RawBinding {
|
||||||
{
|
{
|
||||||
struct FieldVisitor;
|
struct FieldVisitor;
|
||||||
|
|
||||||
static FIELDS: &'static [&'static str] =
|
static FIELDS: &[&str] =
|
||||||
&["key", "mods", "mode", "action", "chars", "mouse", "command"];
|
&["key", "mods", "mode", "action", "chars", "mouse", "command"];
|
||||||
|
|
||||||
impl<'a> Visitor<'a> for FieldVisitor {
|
impl<'a> Visitor<'a> for FieldVisitor {
|
||||||
|
|
|
@ -43,7 +43,7 @@ pub use crate::config::scrolling::Scrolling;
|
||||||
pub use crate::config::visual_bell::{VisualBellAnimation, VisualBellConfig};
|
pub use crate::config::visual_bell::{VisualBellAnimation, VisualBellConfig};
|
||||||
pub use crate::config::window::{Decorations, Dimensions, StartupMode, WindowConfig};
|
pub use crate::config::window::{Decorations, Dimensions, StartupMode, WindowConfig};
|
||||||
|
|
||||||
pub static DEFAULT_ALACRITTY_CONFIG: &'static str =
|
pub static DEFAULT_ALACRITTY_CONFIG: &str =
|
||||||
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../alacritty.yml"));
|
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../alacritty.yml"));
|
||||||
const MAX_SCROLLBACK_LINES: u32 = 100_000;
|
const MAX_SCROLLBACK_LINES: u32 = 100_000;
|
||||||
|
|
||||||
|
|
|
@ -38,23 +38,19 @@ use crate::term::{self, cell, RenderableCell, RenderableCellContent};
|
||||||
pub mod rects;
|
pub mod rects;
|
||||||
|
|
||||||
// Shader paths for live reload
|
// Shader paths for live reload
|
||||||
static TEXT_SHADER_F_PATH: &'static str =
|
static TEXT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl");
|
||||||
concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl");
|
static TEXT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.v.glsl");
|
||||||
static TEXT_SHADER_V_PATH: &'static str =
|
static RECT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl");
|
||||||
concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.v.glsl");
|
static RECT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl");
|
||||||
static RECT_SHADER_F_PATH: &'static str =
|
|
||||||
concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl");
|
|
||||||
static RECT_SHADER_V_PATH: &'static str =
|
|
||||||
concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl");
|
|
||||||
|
|
||||||
// Shader source which is used when live-shader-reload feature is disable
|
// Shader source which is used when live-shader-reload feature is disable
|
||||||
static TEXT_SHADER_F: &'static str =
|
static TEXT_SHADER_F: &str =
|
||||||
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl"));
|
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl"));
|
||||||
static TEXT_SHADER_V: &'static str =
|
static TEXT_SHADER_V: &str =
|
||||||
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.v.glsl"));
|
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.v.glsl"));
|
||||||
static RECT_SHADER_F: &'static str =
|
static RECT_SHADER_F: &str =
|
||||||
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl"));
|
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl"));
|
||||||
static RECT_SHADER_V: &'static str =
|
static RECT_SHADER_V: &str =
|
||||||
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl"));
|
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl"));
|
||||||
|
|
||||||
/// `LoadGlyph` allows for copying a rasterized glyph into graphics memory
|
/// `LoadGlyph` allows for copying a rasterized glyph into graphics memory
|
||||||
|
|
|
@ -35,7 +35,7 @@ use crate::config::{Config, Decorations, StartupMode, WindowConfig};
|
||||||
|
|
||||||
// It's required to be in this directory due to the `windows.rc` file
|
// It's required to be in this directory due to the `windows.rc` file
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
static WINDOW_ICON: &'static [u8] = include_bytes!("../../extra/windows/alacritty.ico");
|
static WINDOW_ICON: &[u8] = include_bytes!("../../extra/windows/alacritty.ico");
|
||||||
|
|
||||||
/// Default Alacritty name, used for window title and class.
|
/// Default Alacritty name, used for window title and class.
|
||||||
pub const DEFAULT_NAME: &str = "Alacritty";
|
pub const DEFAULT_NAME: &str = "Alacritty";
|
||||||
|
|
Loading…
Reference in a new issue