diff --git a/Cargo.toml b/Cargo.toml index 99d2b3b..e4d7660 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ authors = ["Paul-Christian Volkmer"] members = ["ui"] [dependencies] -openssl = { version = "0.10"} +openssl = { version = "0.10" } clap = { version = "4.5", features = ["std", "help", "usage", "derive", "error-context"], default-features = false } console = "0.15" itertools = "0.14" diff --git a/src/lib.rs b/src/lib.rs index d25ad36..bfe86c6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,7 +47,7 @@ fn asn1time(time: &SystemTime) -> Asn1Time { .expect("time not went backwards") .as_secs() as i64, ) - .unwrap() + .unwrap() } #[derive(PartialEq)] diff --git a/src/main.rs b/src/main.rs index fecbcff..f474457 100644 --- a/src/main.rs +++ b/src/main.rs @@ -97,7 +97,7 @@ fn main() -> Result<(), ()> { Ok(pem) => { println!("{pem}"); eprintln!("{}", style("success").green()); - }, + } Err(err) => eprintln!("{}", style(err).red()), } } diff --git a/ui/src/main.rs b/ui/src/main.rs index fd589ee..9f54632 100644 --- a/ui/src/main.rs +++ b/ui/src/main.rs @@ -278,17 +278,17 @@ impl Ui { File::Invalid(_) => text_input(placeholder, &text), _ => text_input(placeholder, &text), } - .width(Length::Fill) - .style(move |theme, status| text_input::Style { - background: Background::Color(Color::WHITE), - placeholder: color!(0x888888), - value: match file { - File::Certificates(_, _) | File::PrivateKey(_, _) => Color::BLACK, - File::Invalid(_) => color!(0xaa0000), - File::None => color!(0x888888), - }, - ..text_input::default(theme, status) - }) + .width(Length::Fill) + .style(move |theme, status| text_input::Style { + background: Background::Color(Color::WHITE), + placeholder: color!(0x888888), + value: match file { + File::Certificates(_, _) | File::PrivateKey(_, _) => Color::BLACK, + File::Invalid(_) => color!(0xaa0000), + File::None => color!(0x888888), + }, + ..text_input::default(theme, status) + }) } let cert_file_input = { @@ -306,8 +306,8 @@ impl Ui { .on_press(Message::PickCertFile) .style(button::secondary) ] - .spacing(2) - .align_y(alignment::Vertical::Center) + .spacing(2) + .align_y(alignment::Vertical::Center) }; let ca_file_input = { @@ -329,8 +329,8 @@ impl Ui { button("..").style(button::secondary) } ] - .spacing(2) - .align_y(alignment::Vertical::Center) + .spacing(2) + .align_y(alignment::Vertical::Center) }; let key_file_input = { @@ -352,8 +352,8 @@ impl Ui { button("..").style(button::secondary) } ] - .spacing(2) - .align_y(alignment::Vertical::Center) + .spacing(2) + .align_y(alignment::Vertical::Center) }; let export_button = if !(self.chain_indicator_state == IndicatorState::Success @@ -406,7 +406,7 @@ impl Ui { horizontal_space(), ] } - .spacing(2); + .spacing(2); let output = { Scrollable::new( @@ -418,7 +418,7 @@ impl Ui { }) .font(Font::MONOSPACE), ) - .height(Length::Fill) + .height(Length::Fill) }; let certs = { @@ -527,14 +527,14 @@ impl Ui { ] }, ] - .spacing(2), + .spacing(2), ) - .padding(8) - .style(|_| container::Style { - background: Some(Background::Color(Color::WHITE)), - ..container::Style::default() - }) - .width(Length::Fill), + .padding(8) + .style(|_| container::Style { + background: Some(Background::Color(Color::WHITE)), + ..container::Style::default() + }) + .width(Length::Fill), ) } }; @@ -682,10 +682,10 @@ impl Ui { .center_x(160) .center_y(40), ] - .spacing(4), + .spacing(4), ) - .center_x(160) - .center_y(80) + .center_x(160) + .center_y(80) }; column![ @@ -709,9 +709,9 @@ impl Ui { text(format!("Version {}", env!("CARGO_PKG_VERSION"))).style(|_| text::Style { color: Some(color!(0x888888)) }), ] ] - .padding(4) - .spacing(2) - .into() + .padding(4) + .spacing(2) + .into() } fn print_output(&self) -> Result {