aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/macos
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2021-10-11 00:54:18 +0000
committerGitHub <noreply@github.com>2021-10-11 00:54:18 +0000
commitf90dd12efd808c8dcb354bb0667d63dd298cf00c (patch)
treed9c0269b1b764f58d942f28223ec19d2fff7e42d /alacritty/src/macos
parentec4dc32688cfc71686c24a4edc59fd7427a6bf33 (diff)
downloadr-alacritty-f90dd12efd808c8dcb354bb0667d63dd298cf00c.tar.gz
r-alacritty-f90dd12efd808c8dcb354bb0667d63dd298cf00c.tar.bz2
r-alacritty-f90dd12efd808c8dcb354bb0667d63dd298cf00c.zip
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.
Diffstat (limited to 'alacritty/src/macos')
-rw-r--r--alacritty/src/macos/locale.rs4
-rw-r--r--alacritty/src/macos/proc.rs3
2 files changed, 2 insertions, 5 deletions
diff --git a/alacritty/src/macos/locale.rs b/alacritty/src/macos/locale.rs
index 6c02c12c..2a47ace8 100644
--- a/alacritty/src/macos/locale.rs
+++ b/alacritty/src/macos/locale.rs
@@ -1,10 +1,8 @@
#![allow(clippy::let_unit_value)]
-use std::env;
use std::ffi::{CStr, CString};
use std::os::raw::c_char;
-use std::slice;
-use std::str;
+use std::{env, slice, str};
use libc::{setlocale, LC_ALL, LC_CTYPE};
use log::debug;
diff --git a/alacritty/src/macos/proc.rs b/alacritty/src/macos/proc.rs
index be7e4891..eaa879d9 100644
--- a/alacritty/src/macos/proc.rs
+++ b/alacritty/src/macos/proc.rs
@@ -150,8 +150,7 @@ mod sys {
mod tests {
use super::*;
- use std::env;
- use std::process;
+ use std::{env, process};
#[test]
fn cwd_matches_current_dir() {