rustler
rustler copied to clipboard
str_to_term in serde code doesn't fall back to string
Quick drive-by issue just to note that this function doesn't behave like its comment says it does:
https://github.com/rusterlium/rustler/blob/ef2045821a4ac3b2d2581edf653d8c5e7a8c37d5/rustler/src/serde/atoms.rs#L22-L37
Specifically, it says it returns a string term if there isn't already an existing atom:
https://github.com/rusterlium/rustler/blob/ef2045821a4ac3b2d2581edf653d8c5e7a8c37d5/rustler/src/serde/atoms.rs#L23
but then doesn't do that and just returns an error instead:
https://github.com/rusterlium/rustler/blob/ef2045821a4ac3b2d2581edf653d8c5e7a8c37d5/rustler/src/serde/atoms.rs#L33