From 90daad999e78c8ec8239e63ea03df6b3b2e364b6 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Wed, 25 Oct 2017 23:02:38 -0400 Subject: remove experimental rust features allow unsafe on function that calls C --- src/rust/tor_allocate/tor_allocate.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/rust/tor_allocate') diff --git a/src/rust/tor_allocate/tor_allocate.rs b/src/rust/tor_allocate/tor_allocate.rs index 7b348b6d02..03ed2499c7 100644 --- a/src/rust/tor_allocate/tor_allocate.rs +++ b/src/rust/tor_allocate/tor_allocate.rs @@ -25,6 +25,10 @@ extern "C" fn tor_malloc_ ( size: usize) -> *mut c_void { /// /// A `*mut c_char` that should be freed by tor_free in C /// +/// Allow unused unsafe as at compile-time, we get warnings that unsafe is not +/// needed even though this calls tor_malloc in C. +/// +#[allow(unused_unsafe)] pub fn allocate_and_copy_string(src: &String) -> *mut c_char { let bytes: &[u8] = src.as_bytes(); -- cgit v1.2.3-54-g00ecf