Continue implementing rooms
Changing lots of things along the way... But that's how it is: Make one change, make more changes to fix the resulting errors and so on.
This commit is contained in:
parent
31ffa5cd67
commit
992e84e67e
12 changed files with 791 additions and 141 deletions
24
cove-tui/src/config.rs
Normal file
24
cove-tui/src/config.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
use std::time::Duration;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct Args {
|
||||
#[clap(long, default_value_t = String::from("wss://plugh.de/cove/"))]
|
||||
cove_url: String,
|
||||
}
|
||||
|
||||
pub struct Config {
|
||||
pub cove_url: String,
|
||||
pub timeout: Duration,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn load() -> Self {
|
||||
let args = Args::parse();
|
||||
Self {
|
||||
cove_url: args.cove_url,
|
||||
timeout: Duration::from_secs(10),
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue