Merge pull request #4 from friedhar/main
General linting / code cleaning.
This commit is contained in:
commit
52710ece81
4 changed files with 11 additions and 8 deletions
|
@ -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"))]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
)),
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue