diff options
| author | martin <martincharles07@gmail.com> | 2024-02-06 21:59:56 -0600 |
|---|---|---|
| committer | Kyle Martin <krm504@nyu.edu> | 2024-02-07 13:09:53 -0500 |
| commit | 4f07aebb6e57affdc0e770a70f85a72e63ea2443 (patch) | |
| tree | 1948a7d6e808fbfd5ab58ad6bcedeef69a8a3401 /rust/src/function.rs | |
| parent | cdf9092d03a9870ecf8418d77dd7ec0e17357a26 (diff) | |
use generic version
Diffstat (limited to 'rust/src/function.rs')
| -rw-r--r-- | rust/src/function.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index e3b586ae..67b68cdc 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -179,14 +179,14 @@ impl Function { } } - pub fn set_can_return_auto(&self, can_return: Conf<bool>) { - let mut raw = BNBoolWithConfidence::from(can_return); - unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut raw) } + pub fn set_can_return_auto<T: Into<Conf<bool>>>(&self, can_return: T) { + let mut bool_with_confidence = can_return.into().into(); + unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut bool_with_confidence) } } - pub fn set_can_return_user(&self, can_return: Conf<bool>) { - let mut raw = BNBoolWithConfidence::from(can_return); - unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut raw) } + pub fn set_can_return_user<T: Into<Conf<bool>>>(&self, can_return: T) { + let mut bool_with_confidence = can_return.into().into(); + unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut bool_with_confidence) } } pub fn comment_at(&self, addr: u64) -> BnString { |
