From d64f392bc90d6057ef6df62229b0ef6d354a67a1 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 9 Feb 2026 17:00:22 -0800 Subject: [Rust] Fix unbalanced ref returned in `RemoteFile::core_file` --- rust/src/collaboration/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust/src') diff --git a/rust/src/collaboration/file.rs b/rust/src/collaboration/file.rs index 993e6bc9..46e27ea5 100644 --- a/rust/src/collaboration/file.rs +++ b/rust/src/collaboration/file.rs @@ -57,10 +57,10 @@ impl RemoteFile { RemoteFile::get_for_local_database(&database) } - pub fn core_file(&self) -> Result { + pub fn core_file(&self) -> Result, ()> { let result = unsafe { BNRemoteFileGetCoreFile(self.handle.as_ptr()) }; NonNull::new(result) - .map(|handle| unsafe { ProjectFile::from_raw(handle) }) + .map(|handle| unsafe { ProjectFile::ref_from_raw(handle) }) .ok_or(()) } -- cgit v1.3.1