emacs-module-rs
emacs-module-rs copied to clipboard
Permissive `FromLisp` for numeric types?
Thanks again for the cool library. General question: should into_rust::<f64>() succeed for non-float literals like 1? Currently it fails, but I'm not sure what users should expect in general here.
Thoughts? Thanks you kindly.
A current workaround I'm using:
v.into_rust::<f64>()
.or_else(|_| v.into_rust::<i64>().map(|n| n as f64))
.ok()