File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,9 @@ pub extern "cdecl" fn unload() -> BOOL {
102102
103103#[ allow( clippy:: missing_safety_doc) ]
104104#[ no_mangle]
105- pub unsafe extern "cdecl" fn request ( h : HGLOBAL , len : * mut c_long ) -> HGLOBAL {
105+ pub extern "cdecl" fn request ( h : HGLOBAL , len : & mut c_long ) -> HGLOBAL {
106106 const RESPONSE_400 : & str = "SHIORI/3.0 400 Bad Request\r \n \r \n " ;
107- let v = unsafe { GStr :: capture ( h, * len as usize ) } ;
107+ let v = GStr :: capture ( h, * len as usize ) ;
108108 let s = match v. to_utf8_str ( ) {
109109 Ok ( s) => s,
110110 Err ( _) => {
@@ -128,6 +128,6 @@ pub unsafe extern "cdecl" fn request(h: HGLOBAL, len: *mut c_long) -> HGLOBAL {
128128 let bytes = response. to_string ( ) . into_bytes ( ) ;
129129 let response_gstr = GStr :: clone_from_slice_nofree ( & bytes) ;
130130
131- unsafe { * len = response_gstr. len ( ) as c_long } ;
131+ * len = response_gstr. len ( ) as c_long ;
132132 response_gstr. handle ( )
133133}
You can’t perform that action at this time.
0 commit comments