From c8969adee28a60e2edbebdc6cc94926a9764a478 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Thu, 24 Aug 2023 12:39:38 -0700 Subject: [PATCH] cargo fmt --- dyesub-cli/src/main.rs | 4 ++-- dyesub-tool/src/components/keyboardfromfile.rs | 5 ++++- dyesub-tool/src/components/keyboardfromweb.rs | 5 ++++- dyesub-tool/src/error/fetchfile.rs | 2 +- dyesub-tool/src/error/fetchkle.rs | 2 +- dyesub-tool/src/error/jserror.rs | 2 +- dyesub-tool/src/error/mod.rs | 2 +- dyesub-tool/src/error/readfile.rs | 2 +- dyesub-tool/src/error/readkle.rs | 2 +- svg-units/src/measure.rs | 2 +- 10 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dyesub-cli/src/main.rs b/dyesub-cli/src/main.rs index f0da4b1..d7d5080 100644 --- a/dyesub-cli/src/main.rs +++ b/dyesub-cli/src/main.rs @@ -13,10 +13,10 @@ struct Args { #[arg(short, long)] output: Option, /// Page width - #[arg(long, default_value="11in")] + #[arg(long, default_value = "11in")] width: SVGMeasure, /// Page height - #[arg(long, default_value="8.5in")] + #[arg(long, default_value = "8.5in")] height: SVGMeasure, } diff --git a/dyesub-tool/src/components/keyboardfromfile.rs b/dyesub-tool/src/components/keyboardfromfile.rs index ddb507c..2795a40 100644 --- a/dyesub-tool/src/components/keyboardfromfile.rs +++ b/dyesub-tool/src/components/keyboardfromfile.rs @@ -22,7 +22,10 @@ pub fn KeyboardFromFile( Ok(keyboard) => { set_result_message(Some(ResultMessageData { title: "Success".to_owned(), - message: format!("Loaded KLE layout {} successfully!", &keyboard.metadata.name), + message: format!( + "Loaded KLE layout {} successfully!", + &keyboard.metadata.name + ), colorway: Colorway::Ok, })); set_keyboard(Some(keyboard)); diff --git a/dyesub-tool/src/components/keyboardfromweb.rs b/dyesub-tool/src/components/keyboardfromweb.rs index 620a020..9db66f3 100644 --- a/dyesub-tool/src/components/keyboardfromweb.rs +++ b/dyesub-tool/src/components/keyboardfromweb.rs @@ -26,7 +26,10 @@ pub fn KeyboardFromWeb( Ok(keyboard) => { set_result_message(Some(ResultMessageData { title: "Success".to_owned(), - message: format!("Loaded KLE layout {} successfully!", &keyboard.metadata.name), + message: format!( + "Loaded KLE layout {} successfully!", + &keyboard.metadata.name + ), colorway: Colorway::Ok, })); set_keyboard(Some(keyboard)); diff --git a/dyesub-tool/src/error/fetchfile.rs b/dyesub-tool/src/error/fetchfile.rs index f7f9552..fa2ae5c 100644 --- a/dyesub-tool/src/error/fetchfile.rs +++ b/dyesub-tool/src/error/fetchfile.rs @@ -15,4 +15,4 @@ impl From for FetchFileError { fn from(value: JsValue) -> Self { Self::Request(value.into()) } -} \ No newline at end of file +} diff --git a/dyesub-tool/src/error/fetchkle.rs b/dyesub-tool/src/error/fetchkle.rs index 8c3c28d..83ce163 100644 --- a/dyesub-tool/src/error/fetchkle.rs +++ b/dyesub-tool/src/error/fetchkle.rs @@ -10,4 +10,4 @@ pub enum FetchKleError { FetchFile(#[from] FetchFileError), #[error("Failed to parse KLE JSON")] Serde(#[from] serde_json::Error), -} \ No newline at end of file +} diff --git a/dyesub-tool/src/error/jserror.rs b/dyesub-tool/src/error/jserror.rs index f634a1b..cffe51e 100644 --- a/dyesub-tool/src/error/jserror.rs +++ b/dyesub-tool/src/error/jserror.rs @@ -9,4 +9,4 @@ impl From for JsError { fn from(value: JsValue) -> Self { Self(value) } -} \ No newline at end of file +} diff --git a/dyesub-tool/src/error/mod.rs b/dyesub-tool/src/error/mod.rs index 12bfc01..cdcb66b 100644 --- a/dyesub-tool/src/error/mod.rs +++ b/dyesub-tool/src/error/mod.rs @@ -11,4 +11,4 @@ mod readkle; pub use readkle::ReadKleError; mod jserror; -pub use jserror::JsError; \ No newline at end of file +pub use jserror::JsError; diff --git a/dyesub-tool/src/error/readfile.rs b/dyesub-tool/src/error/readfile.rs index 8ab8744..744314d 100644 --- a/dyesub-tool/src/error/readfile.rs +++ b/dyesub-tool/src/error/readfile.rs @@ -17,4 +17,4 @@ impl From for ReadFileError { fn from(value: JsValue) -> Self { Self::TextAwait(value.into()) } -} \ No newline at end of file +} diff --git a/dyesub-tool/src/error/readkle.rs b/dyesub-tool/src/error/readkle.rs index 8ec4caa..b839399 100644 --- a/dyesub-tool/src/error/readkle.rs +++ b/dyesub-tool/src/error/readkle.rs @@ -8,4 +8,4 @@ pub enum ReadKleError { ReadFile(#[from] ReadFileError), #[error("Failed to parse KLE JSON")] Serde(#[from] serde_json::Error), -} \ No newline at end of file +} diff --git a/svg-units/src/measure.rs b/svg-units/src/measure.rs index 6c09fc2..f43b907 100644 --- a/svg-units/src/measure.rs +++ b/svg-units/src/measure.rs @@ -1,7 +1,6 @@ use super::SVGUnit; use lazy_static::lazy_static; use regex::Regex; -use thiserror::Error; use std::cmp::Ordering; use std::fmt; use std::num::ParseFloatError; @@ -11,6 +10,7 @@ use std::{ ops::{Add, Div, Mul, Rem, Sub}, }; use strum::ParseError; +use thiserror::Error; #[derive(Debug, Clone, Copy)] pub struct SVGMeasure {