Merge pull request #4 from friedhar/main

General linting / code cleaning.
This commit is contained in:
Jack Chakany 2024-08-30 14:18:00 -04:00 committed by GitHub
commit 52710ece81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 8 deletions

View file

@ -21,7 +21,7 @@ impl AccountManager {
pub fn load_keys(&mut self) -> Result<Vec<Keys>, Error> {
let mut keys = self.get_keys()?;
keys.extend(self.loaded_keys.drain(..));
keys.append(&mut self.loaded_keys);
keys.dedup();
self.loaded_keys = keys.clone();
@ -40,7 +40,7 @@ impl AccountManager {
fn get_platform_keystorage() -> KeyStorageType {
#[cfg(target_os = "linux")]
{
return KeyStorageType::Linux;
KeyStorageType::Linux
}
#[cfg(not(target_os = "linux"))]

View file

@ -2,10 +2,8 @@
use eframe::egui::{self, FontDefinitions, Sense, Vec2b};
use egui::FontFamily::Proportional;
use egui::TextStyle::*;
use egui::{Align, FontId, Layout};
use egui_extras::{Column, TableBuilder};
use tracing::{debug, error, info, Level};
use tracing::{error, info, Level};
mod account_manager;
mod error;

View file

@ -40,7 +40,7 @@ impl From<WsMessage> for RelayMessage {
panic!("could not parse message: {}", e);
}
};
return parsed;
parsed
}
_ => {
panic!("Cannot parse anything but text into a RelayMessage");
@ -125,7 +125,7 @@ impl<'de> Deserialize<'de> for RelayMessage {
Ok(RelayMessage::Notice { message })
}
_ => Err(serde::de::Error::invalid_value(
serde::de::Unexpected::Str(&tag),
serde::de::Unexpected::Str(tag),
&self,
)),
}

View file

@ -1,4 +1,3 @@
use crate::Hoot;
use eframe::egui::{self, RichText};
use rand::random;
@ -10,6 +9,12 @@ pub struct ComposeWindow {
content: String,
}
impl Default for ComposeWindow {
fn default() -> Self {
Self::new()
}
}
impl ComposeWindow {
pub fn new() -> Self {
Self {