mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Stop dropping filename
This commit is contained in:
parent
31651c6962
commit
8f3254bee0
1 changed files with 3 additions and 0 deletions
|
@ -201,6 +201,9 @@ pub fn roc_fx_openFile(name: RocStr) -> *mut BufReader<File> {
|
|||
let f = File::open(name.as_str()).expect("Unable to open file");
|
||||
let br = BufReader::new(f);
|
||||
|
||||
// don't mess with the refcount!
|
||||
core::mem::forget(name);
|
||||
|
||||
Box::into_raw(Box::new(br))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue