mirror of
https://github.com/OMGeeky/confique.git
synced 2026-01-01 17:20:24 +01:00
Fix emission of TOML strings (in particular, quoting)
This commit is contained in:
@@ -172,9 +172,8 @@ struct PrintExpr(&'static Expr);
|
||||
|
||||
impl fmt::Display for PrintExpr {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self.0 {
|
||||
// TODO: escape stuff!
|
||||
Expr::Str(v) => write!(f, "\"{}\"", v),
|
||||
match *self.0 {
|
||||
Expr::Str(v) => toml::Value::String(v.to_owned()).fmt(f),
|
||||
Expr::Float(v) => v.fmt(f),
|
||||
Expr::Integer(v) => v.fmt(f),
|
||||
Expr::Bool(v) => v.fmt(f),
|
||||
|
||||
Reference in New Issue
Block a user