mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
Run cargo --fix edition=2018
This commit is contained in:
parent
7ab0b44847
commit
08069a4e6c
23 changed files with 156 additions and 155 deletions
|
@ -7,6 +7,7 @@ build = "build.rs"
|
|||
description = "GPU-accelerated terminal emulator"
|
||||
readme = "README.md"
|
||||
homepage = "https://github.com/jwilm/alacritty"
|
||||
edition = "2018"
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
|
|
62
src/ansi.rs
62
src/ansi.rs
|
@ -19,9 +19,9 @@ use std::str;
|
|||
|
||||
use vte;
|
||||
use base64;
|
||||
use index::{Column, Line, Contains};
|
||||
use crate::index::{Column, Line, Contains};
|
||||
|
||||
use ::{MouseCursor, Rgb};
|
||||
use crate::{MouseCursor, Rgb};
|
||||
|
||||
// Parse color arguments
|
||||
//
|
||||
|
@ -176,10 +176,10 @@ pub trait TermInfo {
|
|||
/// writing specific handler impls for tests far easier.
|
||||
pub trait Handler {
|
||||
/// OSC to set window title
|
||||
fn set_title(&mut self, &str) {}
|
||||
fn set_title(&mut self, _: &str) {}
|
||||
|
||||
/// Set the window's mouse cursor
|
||||
fn set_mouse_cursor(&mut self, MouseCursor) {}
|
||||
fn set_mouse_cursor(&mut self, _: MouseCursor) {}
|
||||
|
||||
/// Set the cursor style
|
||||
fn set_cursor_style(&mut self, _: Option<CursorStyle>) {}
|
||||
|
@ -188,42 +188,42 @@ pub trait Handler {
|
|||
fn input(&mut self, _c: char) {}
|
||||
|
||||
/// Set cursor to position
|
||||
fn goto(&mut self, Line, Column) {}
|
||||
fn goto(&mut self, _: Line, _: Column) {}
|
||||
|
||||
/// Set cursor to specific row
|
||||
fn goto_line(&mut self, Line) {}
|
||||
fn goto_line(&mut self, _: Line) {}
|
||||
|
||||
/// Set cursor to specific column
|
||||
fn goto_col(&mut self, Column) {}
|
||||
fn goto_col(&mut self, _: Column) {}
|
||||
|
||||
/// Insert blank characters in current line starting from cursor
|
||||
fn insert_blank(&mut self, Column) {}
|
||||
fn insert_blank(&mut self, _: Column) {}
|
||||
|
||||
/// Move cursor up `rows`
|
||||
fn move_up(&mut self, Line) {}
|
||||
fn move_up(&mut self, _: Line) {}
|
||||
|
||||
/// Move cursor down `rows`
|
||||
fn move_down(&mut self, Line) {}
|
||||
fn move_down(&mut self, _: Line) {}
|
||||
|
||||
/// Identify the terminal (should write back to the pty stream)
|
||||
///
|
||||
/// TODO this should probably return an io::Result
|
||||
fn identify_terminal<W: io::Write>(&mut self, &mut W) {}
|
||||
fn identify_terminal<W: io::Write>(&mut self, _: &mut W) {}
|
||||
|
||||
// Report device status
|
||||
fn device_status<W: io::Write>(&mut self, &mut W, usize) {}
|
||||
fn device_status<W: io::Write>(&mut self, _: &mut W, _: usize) {}
|
||||
|
||||
/// Move cursor forward `cols`
|
||||
fn move_forward(&mut self, Column) {}
|
||||
fn move_forward(&mut self, _: Column) {}
|
||||
|
||||
/// Move cursor backward `cols`
|
||||
fn move_backward(&mut self, Column) {}
|
||||
fn move_backward(&mut self, _: Column) {}
|
||||
|
||||
/// Move cursor down `rows` and set to column 1
|
||||
fn move_down_and_cr(&mut self, Line) {}
|
||||
fn move_down_and_cr(&mut self, _: Line) {}
|
||||
|
||||
/// Move cursor up `rows` and set to column 1
|
||||
fn move_up_and_cr(&mut self, Line) {}
|
||||
fn move_up_and_cr(&mut self, _: Line) {}
|
||||
|
||||
/// Put `count` tabs
|
||||
fn put_tab(&mut self, _count: i64) {}
|
||||
|
@ -252,28 +252,28 @@ pub trait Handler {
|
|||
fn set_horizontal_tabstop(&mut self) {}
|
||||
|
||||
/// Scroll up `rows` rows
|
||||
fn scroll_up(&mut self, Line) {}
|
||||
fn scroll_up(&mut self, _: Line) {}
|
||||
|
||||
/// Scroll down `rows` rows
|
||||
fn scroll_down(&mut self, Line) {}
|
||||
fn scroll_down(&mut self, _: Line) {}
|
||||
|
||||
/// Insert `count` blank lines
|
||||
fn insert_blank_lines(&mut self, Line) {}
|
||||
fn insert_blank_lines(&mut self, _: Line) {}
|
||||
|
||||
/// Delete `count` lines
|
||||
fn delete_lines(&mut self, Line) {}
|
||||
fn delete_lines(&mut self, _: Line) {}
|
||||
|
||||
/// Erase `count` chars in current line following cursor
|
||||
///
|
||||
/// Erase means resetting to the default state (default colors, no content,
|
||||
/// no mode flags)
|
||||
fn erase_chars(&mut self, Column) {}
|
||||
fn erase_chars(&mut self, _: Column) {}
|
||||
|
||||
/// Delete `count` chars
|
||||
///
|
||||
/// Deleting a character is like the delete key on the keyboard - everything
|
||||
/// to the right of the deleted things is shifted left.
|
||||
fn delete_chars(&mut self, Column) {}
|
||||
fn delete_chars(&mut self, _: Column) {}
|
||||
|
||||
/// Move backward `count` tabs
|
||||
fn move_backward_tabs(&mut self, _count: i64) {}
|
||||
|
@ -313,10 +313,10 @@ pub trait Handler {
|
|||
fn set_mode(&mut self, _mode: Mode) {}
|
||||
|
||||
/// Unset mode
|
||||
fn unset_mode(&mut self, Mode) {}
|
||||
fn unset_mode(&mut self, _: Mode) {}
|
||||
|
||||
/// DECSTBM - Set the terminal scrolling region
|
||||
fn set_scrolling_region(&mut self, Range<Line>) {}
|
||||
fn set_scrolling_region(&mut self, _: Range<Line>) {}
|
||||
|
||||
/// DECKPAM - Set keypad to applications mode (ESCape instead of digits)
|
||||
fn set_keypad_application_mode(&mut self) {}
|
||||
|
@ -328,22 +328,22 @@ pub trait Handler {
|
|||
///
|
||||
/// 'Invoke' one of G0 to G3 in the GL area. Also referred to as shift in,
|
||||
/// shift out and locking shift depending on the set being activated
|
||||
fn set_active_charset(&mut self, CharsetIndex) {}
|
||||
fn set_active_charset(&mut self, _: CharsetIndex) {}
|
||||
|
||||
/// Assign a graphic character set to G0, G1, G2 or G3
|
||||
///
|
||||
/// 'Designate' a graphic character set as one of G0 to G3, so that it can
|
||||
/// later be 'invoked' by `set_active_charset`
|
||||
fn configure_charset(&mut self, CharsetIndex, StandardCharset) {}
|
||||
fn configure_charset(&mut self, _: CharsetIndex, _: StandardCharset) {}
|
||||
|
||||
/// Set an indexed color value
|
||||
fn set_color(&mut self, usize, Rgb) {}
|
||||
fn set_color(&mut self, _: usize, _: Rgb) {}
|
||||
|
||||
/// Reset an indexed color to original value
|
||||
fn reset_color(&mut self, usize) {}
|
||||
fn reset_color(&mut self, _: usize) {}
|
||||
|
||||
/// Set the clipboard
|
||||
fn set_clipboard(&mut self, &str) {}
|
||||
fn set_clipboard(&mut self, _: &str) {}
|
||||
|
||||
/// Run the dectest routine
|
||||
fn dectest(&mut self) {}
|
||||
|
@ -1393,9 +1393,9 @@ pub mod C1 {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io;
|
||||
use index::{Line, Column};
|
||||
use crate::index::{Line, Column};
|
||||
use super::{Processor, Handler, Attr, TermInfo, Color, StandardCharset, CharsetIndex, parse_rgb_color, parse_number};
|
||||
use ::Rgb;
|
||||
use crate::Rgb;
|
||||
|
||||
/// The /dev/null of `io::Write`
|
||||
struct Void;
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
// limitations under the License.
|
||||
extern crate log;
|
||||
use clap::{Arg, App};
|
||||
use index::{Line, Column};
|
||||
use config::{Dimensions, Shell};
|
||||
use window::{DEFAULT_TITLE, DEFAULT_CLASS};
|
||||
use crate::index::{Line, Column};
|
||||
use crate::config::{Dimensions, Shell};
|
||||
use crate::window::{DEFAULT_TITLE, DEFAULT_CLASS};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::borrow::Cow;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ use std::sync::mpsc;
|
|||
use std::time::Duration;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use ::Rgb;
|
||||
use crate::Rgb;
|
||||
use font::Size;
|
||||
use serde_yaml;
|
||||
use serde::{self, de, Deserialize};
|
||||
|
@ -23,10 +23,10 @@ use notify::{Watcher, watcher, DebouncedEvent, RecursiveMode};
|
|||
|
||||
use glutin::ModifiersState;
|
||||
|
||||
use cli::Options;
|
||||
use input::{Action, Binding, MouseBinding, KeyBinding};
|
||||
use index::{Line, Column};
|
||||
use ansi::{CursorStyle, NamedColor, Color};
|
||||
use crate::cli::Options;
|
||||
use crate::input::{Action, Binding, MouseBinding, KeyBinding};
|
||||
use crate::index::{Line, Column};
|
||||
use crate::ansi::{CursorStyle, NamedColor, Color};
|
||||
|
||||
const MAX_SCROLLBACK_LINES: u32 = 100_000;
|
||||
|
||||
|
@ -735,10 +735,10 @@ impl<'a> de::Deserialize<'a> for ModsWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
struct ActionWrapper(::input::Action);
|
||||
struct ActionWrapper(crate::input::Action);
|
||||
|
||||
impl ActionWrapper {
|
||||
fn into_inner(self) -> ::input::Action {
|
||||
fn into_inner(self) -> crate::input::Action {
|
||||
self.0
|
||||
}
|
||||
}
|
||||
|
@ -811,7 +811,7 @@ impl CommandWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
use ::term::{mode, TermMode};
|
||||
use crate::term::{mode, TermMode};
|
||||
|
||||
struct ModeWrapper {
|
||||
pub mode: TermMode,
|
||||
|
@ -1008,7 +1008,7 @@ impl<'a> de::Deserialize<'a> for RawBinding {
|
|||
let mut mods: Option<ModifiersState> = None;
|
||||
let mut key: Option<Key> = None;
|
||||
let mut chars: Option<String> = None;
|
||||
let mut action: Option<::input::Action> = None;
|
||||
let mut action: Option<crate::input::Action> = None;
|
||||
let mut mode: Option<TermMode> = None;
|
||||
let mut not_mode: Option<TermMode> = None;
|
||||
let mut mouse: Option<::glutin::MouseButton> = None;
|
||||
|
@ -1812,7 +1812,7 @@ pub struct Delta<T: Default> {
|
|||
}
|
||||
|
||||
trait DeserializeSize : Sized {
|
||||
fn deserialize<'a, D>(D) -> ::std::result::Result<Self, D::Error>
|
||||
fn deserialize<'a, D>(_: D) -> ::std::result::Result<Self, D::Error>
|
||||
where D: serde::de::Deserializer<'a>;
|
||||
}
|
||||
|
||||
|
@ -2020,7 +2020,7 @@ pub trait OnConfigReload {
|
|||
fn on_config_reload(&mut self);
|
||||
}
|
||||
|
||||
impl OnConfigReload for ::display::Notifier {
|
||||
impl OnConfigReload for crate::display::Notifier {
|
||||
fn on_config_reload(&mut self) {
|
||||
self.notify();
|
||||
}
|
||||
|
@ -2045,7 +2045,7 @@ impl Monitor {
|
|||
let (config_tx, config_rx) = mpsc::channel();
|
||||
|
||||
Monitor {
|
||||
_thread: ::util::thread::spawn_named("config watcher", move || {
|
||||
_thread: crate::util::thread::spawn_named("config watcher", move || {
|
||||
let (tx, rx) = mpsc::channel();
|
||||
// The Duration argument is a debouncing period.
|
||||
let mut watcher = watcher(tx, Duration::from_millis(10))
|
||||
|
@ -2088,7 +2088,7 @@ impl Monitor {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use cli::Options;
|
||||
use crate::cli::Options;
|
||||
use super::Config;
|
||||
|
||||
#[cfg(target_os="macos")]
|
||||
|
|
|
@ -20,16 +20,16 @@ use std::f64;
|
|||
use parking_lot::MutexGuard;
|
||||
use glutin::dpi::{LogicalPosition, PhysicalSize};
|
||||
|
||||
use cli;
|
||||
use config::Config;
|
||||
use crate::cli;
|
||||
use crate::config::Config;
|
||||
use font::{self, Rasterize};
|
||||
use meter::Meter;
|
||||
use renderer::{self, GlyphCache, QuadRenderer};
|
||||
use term::{Term, SizeInfo, RenderableCell};
|
||||
use sync::FairMutex;
|
||||
use window::{self, Window};
|
||||
use logging::LoggerProxy;
|
||||
use Rgb;
|
||||
use crate::meter::Meter;
|
||||
use crate::renderer::{self, GlyphCache, QuadRenderer};
|
||||
use crate::term::{Term, SizeInfo, RenderableCell};
|
||||
use crate::sync::FairMutex;
|
||||
use crate::window::{self, Window};
|
||||
use crate::logging::LoggerProxy;
|
||||
use crate::Rgb;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
|
@ -476,8 +476,8 @@ impl Display {
|
|||
|
||||
/// Adjust the IME editor position according to the new location of the cursor
|
||||
pub fn update_ime_position(&mut self, terminal: &Term) {
|
||||
use index::{Column, Line, Point};
|
||||
use term::SizeInfo;
|
||||
use crate::index::{Column, Line, Point};
|
||||
use crate::term::SizeInfo;
|
||||
let Point{line: Line(row), col: Column(col)} = terminal.cursor().point;
|
||||
let SizeInfo{cell_width: cw,
|
||||
cell_height: ch,
|
||||
|
|
30
src/event.rs
30
src/event.rs
|
@ -10,19 +10,19 @@ use parking_lot::MutexGuard;
|
|||
use glutin::{self, ModifiersState, Event, ElementState};
|
||||
use copypasta::{Clipboard, Load, Store, Buffer as ClipboardBuffer};
|
||||
|
||||
use ansi::{Handler, ClearMode};
|
||||
use grid::Scroll;
|
||||
use config::{self, Config};
|
||||
use cli::Options;
|
||||
use display::OnResize;
|
||||
use index::{Line, Column, Side, Point};
|
||||
use input::{self, MouseBinding, KeyBinding};
|
||||
use selection::Selection;
|
||||
use sync::FairMutex;
|
||||
use term::{Term, SizeInfo, TermMode, Search};
|
||||
use util::limit;
|
||||
use util::fmt::Red;
|
||||
use window::Window;
|
||||
use crate::ansi::{Handler, ClearMode};
|
||||
use crate::grid::Scroll;
|
||||
use crate::config::{self, Config};
|
||||
use crate::cli::Options;
|
||||
use crate::display::OnResize;
|
||||
use crate::index::{Line, Column, Side, Point};
|
||||
use crate::input::{self, MouseBinding, KeyBinding};
|
||||
use crate::selection::Selection;
|
||||
use crate::sync::FairMutex;
|
||||
use crate::term::{Term, SizeInfo, TermMode, Search};
|
||||
use crate::util::limit;
|
||||
use crate::util::fmt::Red;
|
||||
use crate::window::Window;
|
||||
use glutin::dpi::PhysicalSize;
|
||||
|
||||
/// Byte sequences are sent to a `Notify` in response to some events
|
||||
|
@ -30,7 +30,7 @@ pub trait Notify {
|
|||
/// Notify that an escape sequence should be written to the pty
|
||||
///
|
||||
/// TODO this needs to be able to error somehow
|
||||
fn notify<B: Into<Cow<'static, [u8]>>>(&mut self, B);
|
||||
fn notify<B: Into<Cow<'static, [u8]>>>(&mut self, _: B);
|
||||
}
|
||||
|
||||
pub struct ActionContext<'a, N: 'a> {
|
||||
|
@ -421,7 +421,7 @@ impl<N: Notify> Processor<N> {
|
|||
processor.on_focus_change(is_focused);
|
||||
},
|
||||
DroppedFile(path) => {
|
||||
use input::ActionContext;
|
||||
use crate::input::ActionContext;
|
||||
let path: String = path.to_string_lossy().into();
|
||||
processor.ctx.write_to_pty(path.into_bytes());
|
||||
},
|
||||
|
|
|
@ -12,13 +12,13 @@ use mio_more::channel::{self, Receiver, Sender};
|
|||
#[cfg(not(windows))]
|
||||
use mio::unix::UnixReady;
|
||||
|
||||
use ansi;
|
||||
use display;
|
||||
use event;
|
||||
use tty;
|
||||
use term::Term;
|
||||
use util::thread;
|
||||
use sync::FairMutex;
|
||||
use crate::ansi;
|
||||
use crate::display;
|
||||
use crate::event;
|
||||
use crate::tty;
|
||||
use crate::term::Term;
|
||||
use crate::util::thread;
|
||||
use crate::sync::FairMutex;
|
||||
|
||||
/// Messages that may be sent to the `EventLoop`
|
||||
#[derive(Debug)]
|
||||
|
@ -393,7 +393,7 @@ impl<T> EventLoop<T>
|
|||
break 'event_loop;
|
||||
}
|
||||
|
||||
if ::tty::process_should_exit() {
|
||||
if crate::tty::process_should_exit() {
|
||||
break 'event_loop;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
use std::cmp::{min, max, Ordering};
|
||||
use std::ops::{Deref, Range, Index, IndexMut, RangeTo, RangeFrom, RangeFull};
|
||||
|
||||
use index::{self, Point, Line, Column, IndexRange};
|
||||
use selection::Selection;
|
||||
use crate::index::{self, Point, Line, Column, IndexRange};
|
||||
use crate::selection::Selection;
|
||||
|
||||
mod row;
|
||||
pub use self::row::Row;
|
||||
|
|
|
@ -19,7 +19,7 @@ use std::ops::{Range, RangeTo, RangeFrom, RangeFull, RangeToInclusive};
|
|||
use std::cmp::{max, min};
|
||||
use std::slice;
|
||||
|
||||
use index::Column;
|
||||
use crate::index::Column;
|
||||
|
||||
/// A row in the grid
|
||||
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
use std::ops::{Index, IndexMut};
|
||||
use std::slice;
|
||||
|
||||
use index::Line;
|
||||
use crate::index::Line;
|
||||
use super::Row;
|
||||
|
||||
/// Maximum number of invisible lines before buffer is resized
|
||||
|
@ -308,7 +308,7 @@ impl<T> IndexMut<Line> for Storage<T> {
|
|||
}
|
||||
|
||||
#[cfg(test)]
|
||||
use index::Column;
|
||||
use crate::index::Column;
|
||||
|
||||
/// Grow the buffer one line at the end of the buffer
|
||||
///
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
//! Tests for the Gird
|
||||
|
||||
use super::{Grid, BidirectionalIterator};
|
||||
use index::{Point, Line, Column};
|
||||
use crate::index::{Point, Line, Column};
|
||||
|
||||
// Scroll up moves lines upwards
|
||||
#[test]
|
||||
|
|
|
@ -255,7 +255,7 @@ macro_rules! inclusive {
|
|||
|
||||
#[inline]
|
||||
fn next(&mut self) -> Option<$ty> {
|
||||
use index::RangeInclusive::*;
|
||||
use crate::index::RangeInclusive::*;
|
||||
|
||||
// this function has a sort of odd structure due to borrowck issues
|
||||
// we may need to replace self.range, so borrows of start and end need to end early
|
||||
|
@ -283,7 +283,7 @@ macro_rules! inclusive {
|
|||
|
||||
#[inline]
|
||||
fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
use index::RangeInclusive::*;
|
||||
use crate::index::RangeInclusive::*;
|
||||
|
||||
match *self {
|
||||
Empty { .. } => (0, Some(0)),
|
||||
|
|
32
src/input.rs
32
src/input.rs
|
@ -25,14 +25,14 @@ use std::time::Instant;
|
|||
use copypasta::{Clipboard, Load, Buffer as ClipboardBuffer};
|
||||
use glutin::{ElementState, MouseButton, TouchPhase, MouseScrollDelta, ModifiersState, KeyboardInput};
|
||||
|
||||
use config::{self, Key};
|
||||
use grid::Scroll;
|
||||
use event::{ClickState, Mouse};
|
||||
use index::{Line, Column, Side, Point};
|
||||
use term::SizeInfo;
|
||||
use term::mode::TermMode;
|
||||
use util::fmt::Red;
|
||||
use util::start_daemon;
|
||||
use crate::config::{self, Key};
|
||||
use crate::grid::Scroll;
|
||||
use crate::event::{ClickState, Mouse};
|
||||
use crate::index::{Line, Column, Side, Point};
|
||||
use crate::term::SizeInfo;
|
||||
use crate::term::mode::TermMode;
|
||||
use crate::util::fmt::Red;
|
||||
use crate::util::start_daemon;
|
||||
|
||||
pub const FONT_SIZE_STEP: f32 = 0.5;
|
||||
|
||||
|
@ -52,10 +52,10 @@ pub struct Processor<'a, A: 'a> {
|
|||
}
|
||||
|
||||
pub trait ActionContext {
|
||||
fn write_to_pty<B: Into<Cow<'static, [u8]>>>(&mut self, B);
|
||||
fn write_to_pty<B: Into<Cow<'static, [u8]>>>(&mut self, _: B);
|
||||
fn terminal_mode(&self) -> TermMode;
|
||||
fn size_info(&self) -> SizeInfo;
|
||||
fn copy_selection(&self, ClipboardBuffer);
|
||||
fn copy_selection(&self, _: ClipboardBuffer);
|
||||
fn clear_selection(&mut self);
|
||||
fn update_selection(&mut self, point: Point, side: Side);
|
||||
fn simple_selection(&mut self, point: Point, side: Side);
|
||||
|
@ -769,12 +769,12 @@ mod tests {
|
|||
|
||||
use glutin::{VirtualKeyCode, Event, WindowEvent, ElementState, MouseButton, ModifiersState};
|
||||
|
||||
use term::{SizeInfo, Term, TermMode};
|
||||
use event::{Mouse, ClickState, WindowChanges};
|
||||
use config::{self, Config, ClickHandler};
|
||||
use index::{Point, Side};
|
||||
use selection::Selection;
|
||||
use grid::Scroll;
|
||||
use crate::term::{SizeInfo, Term, TermMode};
|
||||
use crate::event::{Mouse, ClickState, WindowChanges};
|
||||
use crate::config::{self, Config, ClickHandler};
|
||||
use crate::index::{Point, Side};
|
||||
use crate::selection::Selection;
|
||||
use crate::grid::Scroll;
|
||||
|
||||
use super::{Action, Binding, Processor};
|
||||
use copypasta::Buffer as ClipboardBuffer;
|
||||
|
|
|
@ -91,8 +91,8 @@ pub mod window;
|
|||
|
||||
use std::ops::Mul;
|
||||
|
||||
pub use grid::Grid;
|
||||
pub use term::Term;
|
||||
pub use crate::grid::Grid;
|
||||
pub use crate::term::Term;
|
||||
|
||||
/// Facade around [winit's `MouseCursor`](glutin::MouseCursor)
|
||||
#[derive(Debug, Eq, PartialEq, Copy, Clone)]
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
//! The main executable is supposed to call `initialize()` exactly once during
|
||||
//! startup. All logging messages are written to stdout, given that their
|
||||
//! log-level is sufficient for the level configured in `cli::Options`.
|
||||
use cli;
|
||||
use crate::cli;
|
||||
use log::{self, Level};
|
||||
use time;
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@ use std::time::Duration;
|
|||
use cgmath;
|
||||
use fnv::FnvHasher;
|
||||
use font::{self, FontDesc, FontKey, GlyphKey, Rasterize, RasterizedGlyph, Rasterizer};
|
||||
use gl::types::*;
|
||||
use gl;
|
||||
use index::{Column, Line, RangeInclusive};
|
||||
use crate::gl::types::*;
|
||||
use crate::gl;
|
||||
use crate::index::{Column, Line, RangeInclusive};
|
||||
use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher};
|
||||
use Rgb;
|
||||
use crate::Rgb;
|
||||
|
||||
use config::{self, Config, Delta};
|
||||
use term::{self, cell, RenderableCell};
|
||||
use crate::config::{self, Config, Delta};
|
||||
use crate::term::{self, cell, RenderableCell};
|
||||
use glutin::dpi::PhysicalSize;
|
||||
|
||||
// Shader paths for live reload
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
use std::cmp::{min, max};
|
||||
use std::ops::Range;
|
||||
|
||||
use index::{Point, Column, Side};
|
||||
use term::Search;
|
||||
use crate::index::{Point, Column, Side};
|
||||
use crate::term::Search;
|
||||
|
||||
/// Describes a region of a 2-dimensional area
|
||||
///
|
||||
|
@ -431,7 +431,7 @@ impl Span {
|
|||
/// look like [ B] and [E ].
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use index::{Line, Column, Side, Point};
|
||||
use crate::index::{Line, Column, Side, Point};
|
||||
use super::{Selection, Span, SpanType};
|
||||
|
||||
struct Dimensions(Point);
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
use ansi::{NamedColor, Color};
|
||||
use grid;
|
||||
use index::Column;
|
||||
use crate::ansi::{NamedColor, Color};
|
||||
use crate::grid;
|
||||
use crate::index::Column;
|
||||
|
||||
// Maximum number of zerowidth characters which will be stored per cell.
|
||||
pub const MAX_ZEROWIDTH_CHARS: usize = 5;
|
||||
|
@ -153,8 +153,8 @@ impl Cell {
|
|||
mod tests {
|
||||
use super::{Cell, LineLength};
|
||||
|
||||
use grid::Row;
|
||||
use index::Column;
|
||||
use crate::grid::Row;
|
||||
use crate::index::Column;
|
||||
|
||||
#[test]
|
||||
fn line_length_works() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::ops::{Index, IndexMut};
|
||||
use std::fmt;
|
||||
|
||||
use {Rgb, ansi};
|
||||
use config::Colors;
|
||||
use crate::{Rgb, ansi};
|
||||
use crate::config::Colors;
|
||||
|
||||
pub const COUNT: usize = 270;
|
||||
|
||||
|
|
|
@ -23,15 +23,15 @@ use unicode_width::UnicodeWidthChar;
|
|||
use url::Url;
|
||||
|
||||
use font::{self, Size};
|
||||
use ansi::{self, Color, NamedColor, Attr, Handler, CharsetIndex, StandardCharset, CursorStyle};
|
||||
use grid::{BidirectionalIterator, Grid, Indexed, IndexRegion, DisplayIter, Scroll, ViewportPosition};
|
||||
use index::{self, Point, Column, Line, IndexRange, Contains, RangeInclusive, Linear};
|
||||
use selection::{self, Selection, Locations};
|
||||
use config::{Config, VisualBellAnimation};
|
||||
use {MouseCursor, Rgb};
|
||||
use crate::ansi::{self, Color, NamedColor, Attr, Handler, CharsetIndex, StandardCharset, CursorStyle};
|
||||
use crate::grid::{BidirectionalIterator, Grid, Indexed, IndexRegion, DisplayIter, Scroll, ViewportPosition};
|
||||
use crate::index::{self, Point, Column, Line, IndexRange, Contains, RangeInclusive, Linear};
|
||||
use crate::selection::{self, Selection, Locations};
|
||||
use crate::config::{Config, VisualBellAnimation};
|
||||
use crate::{MouseCursor, Rgb};
|
||||
use copypasta::{Clipboard, Load, Store};
|
||||
use input::FONT_SIZE_STEP;
|
||||
use logging::LoggerProxy;
|
||||
use crate::input::FONT_SIZE_STEP;
|
||||
use crate::logging::LoggerProxy;
|
||||
|
||||
pub mod cell;
|
||||
pub mod color;
|
||||
|
@ -2083,16 +2083,16 @@ mod tests {
|
|||
extern crate serde_json;
|
||||
|
||||
use super::{Cell, Term, SizeInfo};
|
||||
use term::{cell, Search};
|
||||
use crate::term::{cell, Search};
|
||||
|
||||
use grid::{Grid, Scroll};
|
||||
use index::{Point, Line, Column, Side};
|
||||
use ansi::{self, Handler, CharsetIndex, StandardCharset};
|
||||
use selection::Selection;
|
||||
use crate::grid::{Grid, Scroll};
|
||||
use crate::index::{Point, Line, Column, Side};
|
||||
use crate::ansi::{self, Handler, CharsetIndex, StandardCharset};
|
||||
use crate::selection::Selection;
|
||||
use std::mem;
|
||||
use input::FONT_SIZE_STEP;
|
||||
use crate::input::FONT_SIZE_STEP;
|
||||
use font::Size;
|
||||
use config::Config;
|
||||
use crate::config::Config;
|
||||
|
||||
#[test]
|
||||
fn semantic_selection_works() {
|
||||
|
|
|
@ -18,7 +18,7 @@ use std::{env, io};
|
|||
|
||||
use terminfo::Database;
|
||||
|
||||
use config::Config;
|
||||
use crate::config::Config;
|
||||
|
||||
#[cfg(not(windows))]
|
||||
mod unix;
|
||||
|
@ -39,13 +39,13 @@ pub trait EventedReadWrite {
|
|||
|
||||
fn register(
|
||||
&mut self,
|
||||
&mio::Poll,
|
||||
&mut Iterator<Item = &usize>,
|
||||
mio::Ready,
|
||||
mio::PollOpt,
|
||||
_: &mio::Poll,
|
||||
_: &mut Iterator<Item = &usize>,
|
||||
_: mio::Ready,
|
||||
_: mio::PollOpt,
|
||||
) -> io::Result<()>;
|
||||
fn reregister(&mut self, &mio::Poll, mio::Ready, mio::PollOpt) -> io::Result<()>;
|
||||
fn deregister(&mut self, &mio::Poll) -> io::Result<()>;
|
||||
fn reregister(&mut self, _: &mio::Poll, _: mio::Ready, _: mio::PollOpt) -> io::Result<()>;
|
||||
fn deregister(&mut self, _: &mio::Poll) -> io::Result<()>;
|
||||
|
||||
fn reader(&mut self) -> &mut Self::Reader;
|
||||
fn read_token(&self) -> mio::Token;
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
//! tty related functionality
|
||||
//!
|
||||
|
||||
use tty::EventedReadWrite;
|
||||
use term::SizeInfo;
|
||||
use display::OnResize;
|
||||
use config::{Config, Shell};
|
||||
use cli::Options;
|
||||
use crate::tty::EventedReadWrite;
|
||||
use crate::term::SizeInfo;
|
||||
use crate::display::OnResize;
|
||||
use crate::config::{Config, Shell};
|
||||
use crate::cli::Options;
|
||||
use mio;
|
||||
|
||||
use libc::{self, c_int, pid_t, winsize, SIGCHLD, TIOCSCTTY, WNOHANG};
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
use std::convert::From;
|
||||
use std::fmt::Display;
|
||||
|
||||
use gl;
|
||||
use crate::gl;
|
||||
use glutin::GlContext;
|
||||
#[cfg(windows)]
|
||||
use glutin::Icon;
|
||||
|
@ -26,9 +26,9 @@ use glutin::{
|
|||
};
|
||||
use glutin::dpi::{LogicalPosition, LogicalSize, PhysicalSize};
|
||||
|
||||
use cli::Options;
|
||||
use config::{Decorations, WindowConfig};
|
||||
use MouseCursor;
|
||||
use crate::cli::Options;
|
||||
use crate::config::{Decorations, WindowConfig};
|
||||
use crate::MouseCursor;
|
||||
|
||||
#[cfg(windows)]
|
||||
static WINDOW_ICON: &'static [u8] = include_bytes!("../assets/windows/alacritty.ico");
|
||||
|
|
Loading…
Reference in a new issue