borrow &self in load_script so you can call more than one api lol
This commit is contained in:
parent
130e625cd8
commit
fa6409448f
|
@ -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);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue