chiark / gitweb /
wip toml
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 17 Nov 2020 19:22:56 +0000 (19:22 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 18 Nov 2020 11:30:48 +0000 (11:30 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/toml.rs

index 88d1b1709ed94bb4dbba759f9538f42ecf2f976a..62d86b0598f3d16eb0c429da2723c264cde533f8 100644 (file)
@@ -82,6 +82,10 @@ fn visit<'de, V: Visitor<'de>>(v: V, tv: &'de toml::Value) -> V::Value {
   type TV = toml::Value;
   match tv {
     TV::String(s) => v.visit_borrowed_str(s)?,
+    &TV::Integer(i) => v.visit_i64(i)?,
+    &TV::Float(f) => v.visit_f64(f)?,
+    &TV::Boolean(b) => v.visit_bool(b)?,
+    TV::Datetime(dt) => v.visit_str(&dt.to_string())?,
     TV::Array(a) => v.visit_seq(SA(a.as_slice().iter()))?,
     TV::Table(t) => v.visit_map(MA(t.iter().peekable()))?,
   }