naomijub / edn-rs

[DEPRECATED]: Crate to parse and emit EDN
https://crates.io/crates/edn-rs
MIT License
81 stars 14 forks source link

Symbols beginning with the characters 't', 'f' or 'n' cannot be parsed. #69

Closed jcsoo closed 4 years ago

jcsoo commented 4 years ago
use edn_rs::Edn;
use std::str::FromStr;

fn main() {
    let _: Edn = Edn::from_str("nTEST").unwrap();

results in thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: ParseEdn("n could not be parsed")', } src/main.rs:5:41.

use edn_rs::Edn;
use std::str::FromStr;

fn main() {
    let _: Edn = Edn::from_str("tTEST").unwrap();
}

results in thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: ParseEdn("provided string was nottrueorfalse")', src/main.rs:5:41.

use edn_rs::Edn;
use std::str::FromStr;

fn main() {
    let _: Edn = Edn::from_str("fTEST").unwrap();
}

results in thread 'main' panicked at 'calledResult::unwrap()on anErrvalue: ParseEdn("provided string was nottrueorfalse")', src/main.rs:5:41.

naomijub commented 4 years ago

Looking at this

evaporei commented 4 years ago

Fixed! https://github.com/naomijub/edn-rs/pull/71

You can use version 0.16.9 for the fix :blush: