mirror of https://gitlab.com/slondr/rust-guile.git
fix inverted char->integer function
This commit is contained in:
parent
7f28fcb5ee
commit
470ee531e0
|
@ -119,7 +119,7 @@ pub fn try_scm_to_double(scm: SCM) -> Option<f64> {
|
|||
pub fn try_scm_to_char(scm: SCM) -> Option<char> {
|
||||
unsafe {
|
||||
(scm_is_truthy(scm_char_p(scm)))
|
||||
.then(|| scm_to_uint32(scm_integer_to_char(scm)))
|
||||
.then(|| scm_to_uint32(scm_char_to_integer(scm)))
|
||||
.map(|ch| ch.try_into().unwrap())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue