diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2017-11-30 00:38:29 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-03 12:50:40 -0800 |
commit | d552d28418ef192724b2b4353863708f31f325d4 (patch) | |
tree | 75c3946cc57180df816036cc22deca72fdf2afee /src/main.rs | |
parent | ed6595543b4034cb295761e1a6fb2c49762d554f (diff) | |
download | alacritty-d552d28418ef192724b2b4353863708f31f325d4.tar.gz alacritty-d552d28418ef192724b2b4353863708f31f325d4.zip |
clippy: do and don't pass some things by reference as suggested (needless_pass_by_value, needless_borrow).
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index a9eb9ab0..c18764d2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,7 +42,7 @@ fn main() { let config = load_config(&options); // Run alacritty - if let Err(err) = run(config, options) { + if let Err(err) = run(config, &options) { die!("Alacritty encountered an unrecoverable error:\n\n\t{}\n", Red(err)); } @@ -80,9 +80,9 @@ fn load_config(options: &cli::Options) -> Config { /// /// Creates a window, the terminal state, pty, I/O event loop, input processor, /// config change monitor, and runs the main display loop. -fn run(mut config: Config, options: cli::Options) -> Result<(), Box<Error>> { +fn run(mut config: Config, options: &cli::Options) -> Result<(), Box<Error>> { // Initialize the logger first as to capture output from other subsystems - logging::initialize(&options)?; + logging::initialize(options)?; info!("Welcome to Alacritty."); config.path().map(|config_path| { @@ -92,7 +92,7 @@ fn run(mut config: Config, options: cli::Options) -> Result<(), Box<Error>> { // Create a display. // // The display manages a window and can draw the terminal - let mut display = Display::new(&config, &options)?; + let mut display = Display::new(&config, options)?; info!( "PTY Dimensions: {:?} x {:?}", @@ -116,7 +116,7 @@ fn run(mut config: Config, options: cli::Options) -> Result<(), Box<Error>> { // The pty forks a process to run the shell on the slave side of the // pseudoterminal. A file descriptor for the master side is retained for // reading/writing to the shell. - let mut pty = tty::new(&config, &options, display.size(), window_id); + let mut pty = tty::new(&config, options, display.size(), window_id); // Create the pseudoterminal I/O loop // @@ -141,7 +141,7 @@ fn run(mut config: Config, options: cli::Options) -> Result<(), Box<Error>> { let mut processor = event::Processor::new( event_loop::Notifier(event_loop.channel()), display.resize_channel(), - &options, + options, &config, options.ref_test, display.size().to_owned(), |