Skip to content

Commit 9eaa937

Browse files
committed
[Rust] Fix unbalanced ref returned in RemoteFile::core_file
1 parent 6e6df28 commit 9eaa937

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/src/collaboration/file.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ impl RemoteFile {
5757
RemoteFile::get_for_local_database(&database)
5858
}
5959

60-
pub fn core_file(&self) -> Result<ProjectFile, ()> {
60+
pub fn core_file(&self) -> Result<Ref<ProjectFile>, ()> {
6161
let result = unsafe { BNRemoteFileGetCoreFile(self.handle.as_ptr()) };
6262
NonNull::new(result)
63-
.map(|handle| unsafe { ProjectFile::from_raw(handle) })
63+
.map(|handle| unsafe { ProjectFile::ref_from_raw(handle) })
6464
.ok_or(())
6565
}
6666

0 commit comments

Comments
 (0)