From b6160ab1a834848f604450b0bf982c44bea5fb4b Mon Sep 17 00:00:00 2001 From: jane400 Date: Tue, 17 Sep 2024 20:12:25 +0200 Subject: [PATCH] format: paket.ready --- paket/src/ready.rs | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/paket/src/ready.rs b/paket/src/ready.rs index be2260d..6d1fcab 100644 --- a/paket/src/ready.rs +++ b/paket/src/ready.rs @@ -1,21 +1,10 @@ -// managed the various pages... - -use std::hash::DefaultHasher; -use std::string; -use std::time::Duration; - use adw::prelude::*; use libpaket::{ self, - advices::{AdvicesList, UatToken}, tracking::{Shipment, TrackingParams}, LibraryError, LibraryResult, }; -use relm4::{ - adw, - factory::{FactoryHashMap, FactorySender, FactoryVecDeque}, - prelude::*, -}; +use relm4::{adw, factory::FactoryHashMap, prelude::*}; use crate::advices::{AdvicesView, AdvicesViewInput}; @@ -275,12 +264,10 @@ impl Component for Ready { libpaket::stammdaten::CustomerDataService::Paketankuendigung => { sender.input(ReadyInput::HaveService(Services::SendungVerfolgung)) } - libpaket::stammdaten::CustomerDataService::PostfilialeDirekt => (), - libpaket::stammdaten::CustomerDataService::Digiben => (), - libpaket::stammdaten::CustomerDataService::GeraetAktiviert => (), libpaket::stammdaten::CustomerDataService::Briefankuendigung => { sender.input(ReadyInput::HaveService(Services::Advices)) } + _ => (), } } @@ -345,7 +332,12 @@ impl Component for Ready { if err == LibraryError::APIChange { println!("Upstream API for parcel tracking broke"); sender.input(ReadyInput::ServiceBorked(Services::SendungVerfolgung)); - sender.output(ReadyOutput::Notification("Shipment Tracking API has changed. Deactivating that service.".to_string())).unwrap(); + sender + .output(ReadyOutput::Notification( + "Shipment Tracking API has changed. Deactivating that service." + .to_string(), + )) + .unwrap(); } else { sender.output(ReadyOutput::Error(err)).unwrap(); }