nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit ccf9b8d47b6698dacd06e93bc37bc93dc07dc660
parent 8fa58de49a871eecae4a2ef60f4452286d315d2f
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Sat, 24 Sep 2022 08:39:41 -0500

refactor: remove unnecessary return types

Diffstat:
Msrc/event.rs | 6++----
Msrc/main.rs | 4+---
2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/event.rs b/src/event.rs @@ -295,15 +295,14 @@ mod tests { } #[test] - fn empty_event_tag_match() -> Result<()> { + fn empty_event_tag_match() { let event = simple_event(); assert!(!event .generic_tag_val_intersect('e', &HashSet::from(["foo".to_owned(), "bar".to_owned()]))); - Ok(()) } #[test] - fn single_event_tag_match() -> Result<()> { + fn single_event_tag_match() { let mut event = simple_event(); event.tags = vec![vec!["e".to_owned(), "foo".to_owned()]]; event.build_index(); @@ -314,7 +313,6 @@ mod tests { ), true ); - Ok(()) } #[test] diff --git a/src/main.rs b/src/main.rs @@ -1,7 +1,6 @@ //! Server process use log::info; use nostr_rs_relay::config; -use nostr_rs_relay::error::{Error, Result}; use nostr_rs_relay::server::start_server; use std::env; use std::sync::mpsc as syncmpsc; @@ -19,7 +18,7 @@ fn db_from_args(args: Vec<String>) -> Option<String> { } /// Start running a Nostr relay server. -fn main() -> Result<(), Error> { +fn main() { // setup logger let _ = env_logger::try_init(); info!("Starting up from main"); @@ -49,5 +48,4 @@ fn main() -> Result<(), Error> { }); // block on nostr thread to finish. handle.join().unwrap(); - Ok(()) }