generated from ElnuDev/rust-project
cargo fmt
This commit is contained in:
parent
f6775da3d0
commit
c8969adee2
10 changed files with 17 additions and 11 deletions
|
@ -13,10 +13,10 @@ struct Args {
|
|||
#[arg(short, long)]
|
||||
output: Option<PathBuf>,
|
||||
/// 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,
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,10 @@ pub fn KeyboardFromFile(
|
|||
Ok(keyboard) => {
|
||||
set_result_message(Some(ResultMessageData {
|
||||
title: "Success".to_owned(),
|
||||
message: format!("Loaded KLE layout <b>{}</b> successfully!", &keyboard.metadata.name),
|
||||
message: format!(
|
||||
"Loaded KLE layout <b>{}</b> successfully!",
|
||||
&keyboard.metadata.name
|
||||
),
|
||||
colorway: Colorway::Ok,
|
||||
}));
|
||||
set_keyboard(Some(keyboard));
|
||||
|
|
|
@ -26,7 +26,10 @@ pub fn KeyboardFromWeb(
|
|||
Ok(keyboard) => {
|
||||
set_result_message(Some(ResultMessageData {
|
||||
title: "Success".to_owned(),
|
||||
message: format!("Loaded KLE layout <b>{}</b> successfully!", &keyboard.metadata.name),
|
||||
message: format!(
|
||||
"Loaded KLE layout <b>{}</b> successfully!",
|
||||
&keyboard.metadata.name
|
||||
),
|
||||
colorway: Colorway::Ok,
|
||||
}));
|
||||
set_keyboard(Some(keyboard));
|
||||
|
|
|
@ -15,4 +15,4 @@ impl From<JsValue> for FetchFileError {
|
|||
fn from(value: JsValue) -> Self {
|
||||
Self::Request(value.into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,4 +10,4 @@ pub enum FetchKleError {
|
|||
FetchFile(#[from] FetchFileError),
|
||||
#[error("Failed to parse KLE JSON")]
|
||||
Serde(#[from] serde_json::Error),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,4 +9,4 @@ impl From<JsValue> for JsError {
|
|||
fn from(value: JsValue) -> Self {
|
||||
Self(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,4 +11,4 @@ mod readkle;
|
|||
pub use readkle::ReadKleError;
|
||||
|
||||
mod jserror;
|
||||
pub use jserror::JsError;
|
||||
pub use jserror::JsError;
|
||||
|
|
|
@ -17,4 +17,4 @@ impl From<JsValue> for ReadFileError {
|
|||
fn from(value: JsValue) -> Self {
|
||||
Self::TextAwait(value.into())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,4 @@ pub enum ReadKleError {
|
|||
ReadFile(#[from] ReadFileError),
|
||||
#[error("Failed to parse KLE JSON")]
|
||||
Serde(#[from] serde_json::Error),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue