mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-07-01 03:55:33 +00:00
Split out socket config and switch back to toml
crate
basic-toml does not support externally-tagged enum yet. See: https://github.com/dtolnay/basic-toml/issues/8
This commit is contained in:
parent
4f0f1405dc
commit
c5263c607c
7 changed files with 92 additions and 48 deletions
|
@ -37,13 +37,7 @@ fn server() -> Server {
|
|||
let listener = TcpListener::from_std(listener).unwrap();
|
||||
|
||||
// TODO: Testing config is hard to build because it does have a `Default` impl.
|
||||
let config = basic_toml::from_str(&format!(
|
||||
r#"
|
||||
listen = "" # TODO: unused
|
||||
base_url = "http://{LOCALHOST}:{port}"
|
||||
"#
|
||||
))
|
||||
.unwrap();
|
||||
let config = toml::from_str(&format!(r#"base_url="http://{LOCALHOST}:{port}""#)).unwrap();
|
||||
let st = AppState::new(db, config);
|
||||
let router = blahd::router(Arc::new(st));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue