diff options
author | Corey Farwell <coreyf@rwell.org> | 2018-06-24 08:58:26 -0400 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2018-06-24 08:58:26 -0400 |
commit | 7e9c37f9cb33d937a664dec83ee28da447a41aa6 (patch) | |
tree | 4b64d74c5d271896367fc8e6b051ce1f05cebc2e /src/rust/protover | |
parent | eb784aa9eaced1adb436d752ccdbeb2ff19c9e23 (diff) | |
download | tor-7e9c37f9cb33d937a664dec83ee28da447a41aa6.tar.gz tor-7e9c37f9cb33d937a664dec83ee28da447a41aa6.zip |
Change `allocate_and_copy_string` to take a `&str` instead of `&String`.
Diffstat (limited to 'src/rust/protover')
-rw-r--r-- | src/rust/protover/ffi.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rust/protover/ffi.rs b/src/rust/protover/ffi.rs index cd49e5f931..0470cd487a 100644 --- a/src/rust/protover/ffi.rs +++ b/src/rust/protover/ffi.rs @@ -198,8 +198,7 @@ pub extern "C" fn protover_compute_vote( ) -> *mut c_char { if list.is_null() { - let empty = String::new(); - return allocate_and_copy_string(&empty); + return allocate_and_copy_string(""); } // Dereference of raw pointer requires an unsafe block. The pointer is |