mirror of
https://github.com/OMGeeky/confique.git
synced 2026-02-23 15:38:30 +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 {
|
impl fmt::Display for PrintExpr {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self.0 {
|
match *self.0 {
|
||||||
// TODO: escape stuff!
|
Expr::Str(v) => toml::Value::String(v.to_owned()).fmt(f),
|
||||||
Expr::Str(v) => write!(f, "\"{}\"", v),
|
|
||||||
Expr::Float(v) => v.fmt(f),
|
Expr::Float(v) => v.fmt(f),
|
||||||
Expr::Integer(v) => v.fmt(f),
|
Expr::Integer(v) => v.fmt(f),
|
||||||
Expr::Bool(v) => v.fmt(f),
|
Expr::Bool(v) => v.fmt(f),
|
||||||
|
|||||||
Reference in New Issue
Block a user