Fix redundant static lifetime clippy lint

This commit is contained in:
Matthias Krüger 2019-06-18 23:23:03 +02:00 committed by Christian Duerr
parent a39459ece2
commit 4039f72000
5 changed files with 16 additions and 20 deletions

View File

@ -1420,7 +1420,7 @@ mod tests {
#[test]
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 handler = AttrHandler::default();
@ -1434,7 +1434,7 @@ mod tests {
#[test]
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,
0x32, 0x35, 0x35, 0x6d,
];
@ -1454,7 +1454,7 @@ mod tests {
/// No exactly a test; useful for debugging
#[test]
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, 0x30, 0x6d, 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]
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 handler = CharsetHandler::default();
@ -1526,7 +1526,7 @@ mod tests {
#[test]
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 handler = CharsetHandler::default();

View File

@ -727,7 +727,7 @@ impl<'a> Deserialize<'a> for RawBinding {
{
struct FieldVisitor;
static FIELDS: &'static [&'static str] =
static FIELDS: &[&str] =
&["key", "mods", "mode", "action", "chars", "mouse", "command"];
impl<'a> Visitor<'a> for FieldVisitor {

View File

@ -43,7 +43,7 @@ pub use crate::config::scrolling::Scrolling;
pub use crate::config::visual_bell::{VisualBellAnimation, VisualBellConfig};
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"));
const MAX_SCROLLBACK_LINES: u32 = 100_000;

View File

@ -38,23 +38,19 @@ use crate::term::{self, cell, RenderableCell, RenderableCellContent};
pub mod rects;
// Shader paths for live reload
static TEXT_SHADER_F_PATH: &'static str =
concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.f.glsl");
static TEXT_SHADER_V_PATH: &'static str =
concat!(env!("CARGO_MANIFEST_DIR"), "/../res/text.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");
static TEXT_SHADER_F_PATH: &str = 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 RECT_SHADER_F_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.f.glsl");
static RECT_SHADER_V_PATH: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl");
// 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"));
static TEXT_SHADER_V: &'static str =
static TEXT_SHADER_V: &str =
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"));
static RECT_SHADER_V: &'static str =
static RECT_SHADER_V: &str =
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/../res/rect.v.glsl"));
/// `LoadGlyph` allows for copying a rasterized glyph into graphics memory

View File

@ -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
#[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.
pub const DEFAULT_NAME: &str = "Alacritty";