Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Jan 7, 2024
1 parent 9038f11 commit d0146bc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Device {
pub fn set_screen_size(&mut self, rect: &Rect) {
let size = rect.size();

if size.x < size.y || size.x < 540.0 {
if size.x * 3. < size.y * 2. || size.x < 540.0 {
self.orientation = Orientation::Portrait;
} else {
self.orientation = Orientation::Landscape;
Expand Down
2 changes: 1 addition & 1 deletion core/src/egui/easy_mark/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
pub mod easy_mark_parser;
mod easy_mark_viewer;

pub use easy_mark_parser as parser;
// pub use easy_mark_parser as parser;
pub use easy_mark_viewer::easy_mark;
1 change: 0 additions & 1 deletion core/src/egui/icon.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use crate::imports::*;
pub use egui_phosphor::*;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct IconSize {
Expand Down
4 changes: 2 additions & 2 deletions core/src/modules/account_manager/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ impl<'context> Processor<'context> {
self.context.priority_fees_sompi
} else { 0 };

let wallet_secret = Secret::try_from(self.context.wallet_secret.clone()).expect("expecting wallet secret");
let payment_secret = account.requires_bip39_passphrase(core).then_some(Secret::try_from(self.context.payment_secret.clone()).expect("expecting payment secret"));
let wallet_secret = Secret::from(self.context.wallet_secret.clone());
let payment_secret = account.requires_bip39_passphrase(core).then_some(Secret::from(self.context.payment_secret.clone()));

match self.context.transaction_kind.unwrap() {
TransactionKind::Send => {
Expand Down
4 changes: 2 additions & 2 deletions core/src/modules/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Settings {
pub fn load(&mut self, settings : crate::settings::Settings) {
self.settings = settings;

self.grpc_network_interface = NetworkInterfaceEditor::try_from(&self.settings.node.grpc_network_interface).unwrap();
self.grpc_network_interface = NetworkInterfaceEditor::from(&self.settings.node.grpc_network_interface);
}
}

Expand Down Expand Up @@ -329,7 +329,7 @@ impl Settings {
},
Confirm::Nack => {
self.settings = core.settings.clone();
self.grpc_network_interface = NetworkInterfaceEditor::try_from(&self.settings.node.grpc_network_interface).unwrap();
self.grpc_network_interface = NetworkInterfaceEditor::from(&self.settings.node.grpc_network_interface);
}
}
}
Expand Down

0 comments on commit d0146bc

Please sign in to comment.