summaryrefslogtreecommitdiffstats
path: root/alacritty_terminal
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2019-06-18 23:23:03 +0200
committerChristian Duerr <chrisduerr@users.noreply.github.com>2019-06-18 21:23:03 +0000
commit4039f7200091a0a2d78fa7463a40a5ccd20b5d7e (patch)
treeebce06d4ffa6f411e24d89f3d0bab723b2185ea6 /alacritty_terminal
parenta39459ece2e285f58ce241f8037a1e5fd836877b (diff)
Fix redundant static lifetime clippy lint
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/ansi.rs10
-rw-r--r--alacritty_terminal/src/config/bindings.rs2
-rw-r--r--alacritty_terminal/src/config/mod.rs2
-rw-r--r--alacritty_terminal/src/renderer/mod.rs20
-rw-r--r--alacritty_terminal/src/window.rs2
5 files changed, 16 insertions, 20 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index 27c07a57..07fc18ea 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -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();
diff --git a/alacritty_terminal/src/config/bindings.rs b/alacritty_terminal/src/config/bindings.rs
index 010c0ea0..df68a396 100644
--- a/alacritty_terminal/src/config/bindings.rs
+++ b/alacritty_terminal/src/config/bindings.rs
@@ -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 {
diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs
index 0af7e819..54af0fd1 100644
--- a/alacritty_terminal/src/config/mod.rs
+++ b/alacritty_terminal/src/config/mod.rs
@@ -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;
diff --git a/alacritty_terminal/src/renderer/mod.rs b/alacritty_terminal/src/renderer/mod.rs
index dfaa797e..1e75065a 100644
--- a/alacritty_terminal/src/renderer/mod.rs
+++ b/alacritty_terminal/src/renderer/mod.rs
@@ -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
diff --git a/alacritty_terminal/src/window.rs b/alacritty_terminal/src/window.rs
index 97f29c5b..186d3c12 100644
--- a/alacritty_terminal/src/window.rs
+++ b/alacritty_terminal/src/window.rs
@@ -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";