borrow &self in load_script so you can call more than one api lol

This commit is contained in:
Vivian Lim 2022-12-13 01:56:59 -08:00
parent 130e625cd8
commit fa6409448f
1 changed files with 2 additions and 2 deletions

View File

@ -11,11 +11,11 @@ pub struct GuileApi {
}
impl GuileApi {
pub fn load_script(self, filename: &str) {
pub fn load_script(&self, filename: &str) {
let filename = canonicalize(filename).unwrap();
let cstr_bytes = CString::new(filename.as_os_str().as_bytes()).unwrap().into_bytes_with_nul();
unsafe {
scm_c_primitive_load_path(cstr_bytes.as_ptr() as *const std::os::raw::c_char);
};
}
}
}