~tim/scheme-vm

d090c77e53f589fbc2e1fa6bd8f154bb745d81c0 — Tim Morgan 3 years ago 55349f7
String slice is fine here
1 files changed, 1 insertions(+), 1 deletions(-)

M src/rb.rs
M src/rb.rs => src/rb.rs +1 -1
@@ 120,7 120,7 @@ pub fn ary_push(array: Value, item: Value) -> Value {
    new_array
}

pub fn str_new(string: &String) -> Value {
pub fn str_new(string: &str) -> Value {
    let str = string.as_ptr() as *const c_char;
    let len = string.len() as c_long;
    unsafe { string::rb_str_new(str, len) }