summaryrefslogtreecommitdiffhomepage
path: root/examples/rust/echo-request/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rust/echo-request/src/lib.rs')
-rw-r--r--examples/rust/echo-request/src/lib.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/examples/rust/echo-request/src/lib.rs b/examples/rust/echo-request/src/lib.rs
index 943c514..674bb05 100644
--- a/examples/rust/echo-request/src/lib.rs
+++ b/examples/rust/echo-request/src/lib.rs
@@ -17,17 +17,13 @@ use std::ptr::null_mut;
static mut REQUEST_BUF: *mut u8 = null_mut();
#[no_mangle]
-pub extern "C" fn uwr_module_end_handler() {
- unsafe {
- uwr_free(REQUEST_BUF);
- }
+pub unsafe extern "C" fn uwr_module_end_handler() {
+ uwr_free(REQUEST_BUF);
}
#[no_mangle]
-pub extern "C" fn uwr_module_init_handler() {
- unsafe {
- REQUEST_BUF = uwr_malloc(uwr_mem_get_init_size());
- }
+pub unsafe extern "C" fn uwr_module_init_handler() {
+ REQUEST_BUF = uwr_malloc(uwr_mem_get_init_size());
}
pub extern "C" fn hdr_iter_func(