refactor: misc clippy suggestions
This commit is contained in:
+3
-3
@@ -10,7 +10,7 @@ use std::thread;
|
||||
use console_subscriber::ConsoleLayer;
|
||||
|
||||
/// Return a requested DB name from command line arguments.
|
||||
fn db_from_args(args: Vec<String>) -> Option<String> {
|
||||
fn db_from_args(args: &[String]) -> Option<String> {
|
||||
if args.len() == 3 && args.get(1) == Some(&"--db".to_owned()) {
|
||||
return args.get(2).map(std::clone::Clone::clone);
|
||||
}
|
||||
@@ -25,7 +25,7 @@ fn main() {
|
||||
|
||||
// get database directory from args
|
||||
let args: Vec<String> = env::args().collect();
|
||||
let db_dir: Option<String> = db_from_args(args);
|
||||
let db_dir: Option<String> = db_from_args(&args);
|
||||
// configure settings from config.toml
|
||||
// replace default settings with those read from config.toml
|
||||
let mut settings = config::Settings::new();
|
||||
@@ -44,7 +44,7 @@ fn main() {
|
||||
let handle = thread::spawn(|| {
|
||||
// we should have a 'control plane' channel to monitor and bump the server.
|
||||
// this will let us do stuff like clear the database, shutdown, etc.
|
||||
let _ = start_server(settings, ctrl_rx);
|
||||
let _svr = start_server(settings, ctrl_rx);
|
||||
});
|
||||
// block on nostr thread to finish.
|
||||
handle.join().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user