Closed eerohele closed 2 years ago
I'll take a look, due to the way we process the characters we need to replace #{
by @
. So the issue makes a lot of sense
So you want to read a string that contains an empty set or just read a set?
because if it is read a set, you should be using:
#[test]
fn empty_set() {
assert_eq!("#{}", format!("{}",Edn::from_str("#{}").unwrap()));
}
Having said that, this is a bug and I will need time to fix it, because I will probably need to change how we detect sets
So you want to read a string that contains an empty set or just read a set?
I want to read a string that contains, among other things, a string of Clojure code.
Here's an example input string:
{:token "clj" :code "(reduce conj #{} [1 2 2 3 4])"}
Calling Edn::from_str
on that currently yields {:code "(reduce conj @} [1 2 2 3 4])", :token "clj", }
.
PR is on the way https://github.com/naomijub/edn-rs/pull/92
But I have already published the version 0.17.1
so it unblocks you
Wow, thank you very much for the quick fix, as well as for the great library!
Prints:
Expected output:
I'm only getting started with Rust, so my apologies in advance if this is a rookie mistake.