diff options
| author | Andrew Clayton <a.clayton@nginx.com> | 2025-05-14 20:37:16 +0100 |
|---|---|---|
| committer | Andrew Clayton <a.clayton@nginx.com> | 2025-05-14 20:37:16 +0100 |
| commit | 89900c002afb77366503330b513c2547b6cf1abd (patch) | |
| tree | 8ac51d78b1e91fea3cc3840706830c14bfc9dbc2 /examples/rust/large-upload/src/lib.rs | |
| parent | a7ca0088535ba2cfa898bacf54067517cda7ee7d (diff) | |
| download | unit-wasm-89900c002afb77366503330b513c2547b6cf1abd.tar.gz unit-wasm-89900c002afb77366503330b513c2547b6cf1abd.tar.bz2 | |
examples/rust: Remove some redundant unsafe blocks
... as noted by the compiler...
Fixes: 2cf492f ("examples/rust: Fix some new rustc warnings")
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'examples/rust/large-upload/src/lib.rs')
| -rw-r--r-- | examples/rust/large-upload/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/rust/large-upload/src/lib.rs b/examples/rust/large-upload/src/lib.rs index df7e963..5757e6c 100644 --- a/examples/rust/large-upload/src/lib.rs +++ b/examples/rust/large-upload/src/lib.rs @@ -32,7 +32,7 @@ pub unsafe extern "C" fn uwr_response_end_handler() { #[no_mangle] pub extern "C" fn uwr_request_handler(addr: *mut u8) -> i32 { - let ctx: *mut luw_ctx_t = unsafe { addr_of_mut!(CTX) }; + let ctx: *mut luw_ctx_t = addr_of_mut!(CTX); let mut f; let bytes_wrote: isize; let mut total = unsafe { TOTAL_BYTES_WROTE }; @@ -41,7 +41,7 @@ pub extern "C" fn uwr_request_handler(addr: *mut u8) -> i32 { uwr_init_ctx(ctx, addr, 0); uwr_set_req_buf( ctx, - unsafe { addr_of_mut!(REQUEST_BUF) }, + addr_of_mut!(REQUEST_BUF), LUW_SRB_NONE, ); |
