summaryrefslogtreecommitdiff
path: root/rust/src
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/types.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/rust/src/types.rs b/rust/src/types.rs
index 93d0f233..9d9e25cb 100644
--- a/rust/src/types.rs
+++ b/rust/src/types.rs
@@ -188,6 +188,12 @@ impl<'a, T: RefCountable> From<&'a Conf<Ref<T>>> for Conf<&'a T> {
}
}
+impl<'a, T: RefCountable> From<&'a Ref<T>> for Conf<&'a T> {
+ fn from(r: &'a Ref<T>) -> Self {
+ r.as_ref().into()
+ }
+}
+
#[inline]
pub fn min_confidence() -> u8 {
u8::MIN