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 1
- use std:: { ptr, mem } ;
1
+ use std:: ptr;
2
2
use thiserror:: Error ;
3
3
4
4
pub mod ffi {
@@ -53,7 +53,7 @@ pub mod ffi {
53
53
}
54
54
55
55
extern "C" {
56
- pub fn ada_parse ( url : * const c_char ) -> ada_url ;
56
+ pub fn ada_parse ( url : * const c_char ) -> * mut ada_url ;
57
57
pub fn ada_free ( url : * mut ada_url ) ;
58
58
pub fn ada_free_owned_string ( url : * mut ada_owned_string ) ;
59
59
pub fn ada_is_valid ( url : * mut ada_url ) -> bool ;
@@ -181,7 +181,7 @@ impl Url {
181
181
182
182
pub fn parse < U : AsRef < str > > ( url : U ) -> Result < Url , Error > {
183
183
unsafe {
184
- let url_aggregator = ffi:: ada_parse ( url. as_ref ( ) . as_ptr ( ) . cast ( ) ) ;
184
+ let mut url_aggregator = ffi:: ada_parse ( url. as_ref ( ) . as_ptr ( ) . cast ( ) ) ;
185
185
186
186
if ffi:: ada_is_valid ( url_aggregator) {
187
187
Ok ( Url {
You can’t perform that action at this time.
0 commit comments