From 4f07aebb6e57affdc0e770a70f85a72e63ea2443 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 6 Feb 2024 21:59:56 -0600 Subject: use generic version --- rust/src/function.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'rust/src/function.rs') 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) { - let mut raw = BNBoolWithConfidence::from(can_return); - unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut raw) } + pub fn set_can_return_auto>>(&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) { - let mut raw = BNBoolWithConfidence::from(can_return); - unsafe { BNSetAutoFunctionCanReturn(self.handle, &mut raw) } + pub fn set_can_return_user>>(&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 { -- cgit v1.3.1