diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-07-02 17:16:44 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-07-02 17:16:44 -0400 |
| commit | 82dabf37d07cfdc8e299bce50d0cccf0fee37333 (patch) | |
| tree | 6c51d75af1d60f71485d2dbc206e8b3dc257b6c7 /rust/src | |
| parent | 3f445f23438d98165f81f03492f79ef86d9a5db2 (diff) | |
Fix many crashes from uncaught exceptions
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/project.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rust/src/project.rs b/rust/src/project.rs index 26c2a72e..beb0f008 100644 --- a/rust/src/project.rs +++ b/rust/src/project.rs @@ -847,7 +847,7 @@ impl ProjectFolder { } /// Set the name of this folder - pub fn set_name<S: BnStrCompatible>(&self, value: S) { + pub fn set_name<S: BnStrCompatible>(&self, value: S) -> bool { let value_raw = value.into_bytes_with_nul(); unsafe { BNProjectFolderSetName( @@ -863,7 +863,7 @@ impl ProjectFolder { } /// Set the description of this folder - pub fn set_description<S: BnStrCompatible>(&self, value: S) { + pub fn set_description<S: BnStrCompatible>(&self, value: S) -> bool { let value_raw = value.into_bytes_with_nul(); unsafe { BNProjectFolderSetDescription( @@ -880,7 +880,7 @@ impl ProjectFolder { } /// Set the folder that contains this folder - pub fn set_folder(&self, folder: Option<&ProjectFolder>) { + pub fn set_folder(&self, folder: Option<&ProjectFolder>) -> bool { let folder_handle = folder .map(|x| unsafe { x.as_raw() as *mut _ }) .unwrap_or(null_mut()); @@ -997,7 +997,7 @@ impl ProjectFile { } /// Set the name of this file - pub fn set_name<S: BnStrCompatible>(&self, value: S) { + pub fn set_name<S: BnStrCompatible>(&self, value: S) -> bool { let value_raw = value.into_bytes_with_nul(); unsafe { BNProjectFileSetName( @@ -1013,7 +1013,7 @@ impl ProjectFile { } /// Set the description of this file - pub fn set_description<S: BnStrCompatible>(&self, value: S) { + pub fn set_description<S: BnStrCompatible>(&self, value: S) -> bool { let value_raw = value.into_bytes_with_nul(); unsafe { BNProjectFileSetDescription( @@ -1035,7 +1035,7 @@ impl ProjectFile { } /// Set the folder that contains this file - pub fn set_folder(&self, folder: Option<&ProjectFolder>) { + pub fn set_folder(&self, folder: Option<&ProjectFolder>) -> bool { let folder_handle = folder .map(|x| unsafe { x.as_raw() as *mut _ }) .unwrap_or(null_mut()); |
