mirror of
https://github.com/scsibug/nostr-rs-relay.git
synced 2024-11-09 21:29:06 -05:00
refactor: remove unnecessary return types
This commit is contained in:
parent
8fa58de49a
commit
ccf9b8d47b
|
@ -295,15 +295,14 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn empty_event_tag_match() -> Result<()> {
|
fn empty_event_tag_match() {
|
||||||
let event = simple_event();
|
let event = simple_event();
|
||||||
assert!(!event
|
assert!(!event
|
||||||
.generic_tag_val_intersect('e', &HashSet::from(["foo".to_owned(), "bar".to_owned()])));
|
.generic_tag_val_intersect('e', &HashSet::from(["foo".to_owned(), "bar".to_owned()])));
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn single_event_tag_match() -> Result<()> {
|
fn single_event_tag_match() {
|
||||||
let mut event = simple_event();
|
let mut event = simple_event();
|
||||||
event.tags = vec![vec!["e".to_owned(), "foo".to_owned()]];
|
event.tags = vec![vec!["e".to_owned(), "foo".to_owned()]];
|
||||||
event.build_index();
|
event.build_index();
|
||||||
|
@ -314,7 +313,6 @@ mod tests {
|
||||||
),
|
),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
//! Server process
|
//! Server process
|
||||||
use log::info;
|
use log::info;
|
||||||
use nostr_rs_relay::config;
|
use nostr_rs_relay::config;
|
||||||
use nostr_rs_relay::error::{Error, Result};
|
|
||||||
use nostr_rs_relay::server::start_server;
|
use nostr_rs_relay::server::start_server;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::sync::mpsc as syncmpsc;
|
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.
|
/// Start running a Nostr relay server.
|
||||||
fn main() -> Result<(), Error> {
|
fn main() {
|
||||||
// setup logger
|
// setup logger
|
||||||
let _ = env_logger::try_init();
|
let _ = env_logger::try_init();
|
||||||
info!("Starting up from main");
|
info!("Starting up from main");
|
||||||
|
@ -49,5 +48,4 @@ fn main() -> Result<(), Error> {
|
||||||
});
|
});
|
||||||
// block on nostr thread to finish.
|
// block on nostr thread to finish.
|
||||||
handle.join().unwrap();
|
handle.join().unwrap();
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user