toml 0.4.4

A native Rust encoder and decoder of TOML-formatted files and streams. Provides implementations of the standard Serialize/Deserialize traits for TOML data to facilitate deserializing and serializing Rust structures.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern crate toml;

use std::f64;

#[test]
fn test_invalid_float_encode() {
    fn bad(value: toml::Value) {
        assert!(toml::to_string(&value).is_err());
    }

    bad(toml::Value::Float(f64::INFINITY));
    bad(toml::Value::Float(f64::NEG_INFINITY));
    bad(toml::Value::Float(f64::NAN));
}