diff options
author | cypherpunks <cypherpunks@torproject.org> | 2018-08-03 19:48:10 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-16 08:42:57 -0400 |
commit | 6b609ce4356423a28e7b421a9f09849d831a0c6f (patch) | |
tree | 0feff6aae6ea11f4933d47e96949539c32368e3d /src/rust/smartlist | |
parent | 32ad8e991999277948e896196731f2919c390f00 (diff) | |
download | tor-6b609ce4356423a28e7b421a9f09849d831a0c6f.tar.gz tor-6b609ce4356423a28e7b421a9f09849d831a0c6f.zip |
rust: run rustfmt
Diffstat (limited to 'src/rust/smartlist')
-rw-r--r-- | src/rust/smartlist/smartlist.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rust/smartlist/smartlist.rs b/src/rust/smartlist/smartlist.rs index 747d22f78c..bce58c0ef9 100644 --- a/src/rust/smartlist/smartlist.rs +++ b/src/rust/smartlist/smartlist.rs @@ -1,9 +1,9 @@ // Copyright (c) 2016-2018, The Tor Project, Inc. */ // See LICENSE for licensing information */ -use std::slice; use libc::{c_char, c_int}; use std::ffi::CStr; +use std::slice; /// Smartlists are a type used in C code in tor to define a collection of a /// generic type, which has a capacity and a number used. Each Smartlist @@ -65,8 +65,8 @@ mod test { fn test_get_list_of_strings() { extern crate libc; - use std::ffi::CString; use libc::c_char; + use std::ffi::CString; use super::Smartlist; use super::Stringlist; @@ -89,13 +89,13 @@ mod test { let args = vec![String::from("a"), String::from("b")]; // for each string, transform it into a CString - let c_strings: Vec<_> = args.iter() + let c_strings: Vec<_> = args + .iter() .map(|arg| CString::new(arg.as_str()).unwrap()) .collect(); // then, collect a pointer for each CString - let p_args: Vec<_> = - c_strings.iter().map(|arg| arg.as_ptr()).collect(); + let p_args: Vec<_> = c_strings.iter().map(|arg| arg.as_ptr()).collect(); let p: *const *const c_char = p_args.as_ptr(); |