rustfmt.toml

This commit is contained in:
Alex Janka 2024-09-26 10:42:24 +10:00
parent d537999b8c
commit af1c013562
6 changed files with 11 additions and 8 deletions

2
rust-toolchain.toml Normal file
View file

@ -0,0 +1,2 @@
[toolchain]
channel = "nightly"

5
rustfmt.toml Normal file
View file

@ -0,0 +1,5 @@
wrap_comments = true
imports_granularity = "Crate"
group_imports = "One"
newline_style = "Unix"
use_field_init_shorthand = true

View file

@ -1,6 +1,5 @@
use palette::FromColor;
use crate::prelude::*; use crate::prelude::*;
use palette::FromColor;
pub type Format = palette::Oklab; pub type Format = palette::Oklab;
pub type RgbFormat = palette::Srgb<u8>; pub type RgbFormat = palette::Srgb<u8>;

View file

@ -1,6 +1,5 @@
use serde::{Deserialize, Serialize};
use crate::prelude::*; use crate::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(default)] #[serde(default)]

View file

@ -1,3 +1,4 @@
use crate::prelude::*;
use log::LevelFilter; use log::LevelFilter;
use log4rs::{ use log4rs::{
append::{ append::{
@ -12,8 +13,6 @@ use log4rs::{
Config, Config,
}; };
use crate::prelude::*;
pub async fn init_logger(file: bool) -> Res<()> { pub async fn init_logger(file: bool) -> Res<()> {
let stderr = ConsoleAppender::builder() let stderr = ConsoleAppender::builder()
.target(Target::Stderr) .target(Target::Stderr)

View file

@ -8,8 +8,7 @@ mod logger;
pub mod prelude { pub mod prelude {
pub(crate) use crate::colour; pub(crate) use crate::colour;
pub use crate::error::*; pub use crate::{error::*, CONFIG};
pub use crate::CONFIG;
} }
use prelude::*; use prelude::*;