make clippy happy with default impls

This commit is contained in:
Mike Dilger 2023-10-04 09:46:40 +13:00
parent 9dd731962f
commit 6ec3cf58b5
4 changed files with 19 additions and 17 deletions

View File

@ -4,23 +4,6 @@
// TEMPORARILY
#![allow(clippy::uninlined_format_args)]
/*
macro_rules! rtry {
($expr:expr $(,)?) => {
match $expr {
core::result::Result::Ok(val) => val,
core::result::Result::Err(err) => {
return core::result::Result::Err(core::convert::From::from((
err,
file!(),
line!(),
)));
}
}
};
}
*/
use gossip_lib::comms::ToOverlordMessage;
use gossip_lib::error::Error;
use gossip_lib::globals::GLOBALS;

View File

@ -55,6 +55,12 @@ pub struct Feed {
thread_parent: RwLock<Option<Id>>,
}
impl Default for Feed {
fn default() -> Self {
Self::new()
}
}
impl Feed {
pub fn new() -> Feed {
Feed {

View File

@ -22,6 +22,13 @@ pub struct Media {
failed_media: RwLock<HashSet<UncheckedUrl>>,
}
impl Default for Media {
fn default() -> Self {
Self::new()
}
}
impl Media {
pub fn new() -> Media {
Media {

View File

@ -85,6 +85,12 @@ pub struct People {
pub last_mute_list_size: AtomicUsize,
}
impl Default for People {
fn default() -> Self {
Self::new()
}
}
impl People {
pub fn new() -> People {
People {