From f90dd12efd808c8dcb354bb0667d63dd298cf00c Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Mon, 11 Oct 2021 00:54:18 +0000 Subject: Update rustfmt configuration In this change I went through all current rustfmt configuration options and expanded our existing configuration with overrides whenever deemed appropriate. The `normalize_doc_attributes` option is still unstable, but seems to work without any issues. Even when passing macros like `include_str!` that is recognized properly and not normalized. So while this wasn't an issue anywhere in the code, it should make sure it never will be. When it comes to imports there are two new major additions. The `imports_granularity` and `group_imports` options. Both mostly just incorporate unwritten rules that have existed in Alacritty for a long time. Unfortunately since `alacritty_terminal` imports in `alacritty` are supposed to be separate blocks, the `group_imports` option cannot be used. --- alacritty/src/renderer/mod.rs | 3 +-- alacritty/src/renderer/rects.rs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'alacritty/src/renderer') diff --git a/alacritty/src/renderer/mod.rs b/alacritty/src/renderer/mod.rs index 11ccfc63..23be70be 100644 --- a/alacritty/src/renderer/mod.rs +++ b/alacritty/src/renderer/mod.rs @@ -1,9 +1,8 @@ use std::collections::HashMap; use std::fmt::{self, Display, Formatter}; use std::hash::BuildHasherDefault; -use std::io; use std::mem::size_of; -use std::ptr; +use std::{io, ptr}; use bitflags::bitflags; use crossfont::{ diff --git a/alacritty/src/renderer/rects.rs b/alacritty/src/renderer/rects.rs index 77c22011..fafa7a78 100644 --- a/alacritty/src/renderer/rects.rs +++ b/alacritty/src/renderer/rects.rs @@ -10,9 +10,8 @@ use alacritty_terminal::term::color::Rgb; use alacritty_terminal::term::SizeInfo; use crate::display::content::RenderableCell; -use crate::gl; use crate::gl::types::*; -use crate::renderer; +use crate::{gl, renderer}; #[derive(Debug, Copy, Clone)] pub struct RenderRect { -- cgit