let mut f = File::open(filename).context("open")?;
let mut buf = String::new();
f.read_to_string(&mut buf).context("read")?;
- let spec : T = otter::toml::from_str(&buf).context("parse")?;
+ let spec : T = toml_de::from_str(&buf).context("parse")?;
Ok::<_,AE>(spec)
})().with_context(|| format!("read {} {:?}", what, filename))?
}
let mut buf = String::new();
File::open(&config_filename).with_context(||config_filename.to_string())?
.read_to_string(&mut buf)?;
- let config : ServerConfigSpec = crate::toml::from_str(&buf)?;
+ let config : ServerConfigSpec = toml_de::from_str(&buf)?;
let config = config.try_into()?;
set_config(config);
}
impl Default for ServerConfig {
fn default() -> ServerConfig {
- let spec : ServerConfigSpec = crate::toml::from_str(r#"
+ let spec : ServerConfigSpec = toml_de::from_str(r#"
public_url = "XXX"
"#)
.expect("parse dummy config as ServerConfigSpec");
pub use crate::config::*;
pub use crate::accounts::*;
pub use crate::accounts::loaded_acl::{self,LoadedAcl,EffectiveACL,PermSet};
+pub use crate::toml_de;
pub use zcoord::{self, ZCoord};
pub mod tz;
pub mod accounts;
pub mod config;
-pub mod toml;
+#[path="toml-de.rs"] pub mod toml_de;
#[path="slotmap-slot-idx.rs"] pub mod slotmap_slot_idx;