diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-04-18 15:22:24 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-04-18 15:22:24 +0200 |
| commit | 1ff09656b1fe97008fa6efaee6078d35528fcc66 (patch) | |
| tree | 235f3bbc78f511e93948534f1ec038a2de52807b /openvpn_ffi/src/parse.rs | |
| parent | 7b054cf70ef6eaccc3886364fecf8814a541a00b (diff) | |
| download | mullvadvpn-1ff09656b1fe97008fa6efaee6078d35528fcc66.tar.xz mullvadvpn-1ff09656b1fe97008fa6efaee6078d35528fcc66.zip | |
Reformat with new rustfmt settings
Diffstat (limited to 'openvpn_ffi/src/parse.rs')
| -rw-r--r-- | openvpn_ffi/src/parse.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/openvpn_ffi/src/parse.rs b/openvpn_ffi/src/parse.rs index 2da10e3ca2..787883fd70 100644 --- a/openvpn_ffi/src/parse.rs +++ b/openvpn_ffi/src/parse.rs @@ -95,9 +95,11 @@ mod tests { fn string_array_two_strings() { let test_str1 = "foobar\0"; let test_str2 = "barbaz\0"; - let ptr_arr = [test_str1 as *const _ as *const c_char, - test_str2 as *const _ as *const c_char, - ptr::null()]; + let ptr_arr = [ + test_str1 as *const _ as *const c_char, + test_str2 as *const _ as *const c_char, + ptr::null(), + ]; let result = unsafe { string_array(&ptr_arr as *const *const c_char).unwrap() }; assert_eq!(["foobar", "barbaz"], &result[..]); } @@ -132,9 +134,11 @@ mod tests { fn env_two_same_key() { let test_str1 = "foo=123\0"; let test_str2 = "foo=abc\0"; - let ptr_arr = [test_str1 as *const _ as *const c_char, - test_str2 as *const _ as *const c_char, - ptr::null()]; + let ptr_arr = [ + test_str1 as *const _ as *const c_char, + test_str2 as *const _ as *const c_char, + ptr::null(), + ]; let env = unsafe { env(&ptr_arr as *const *const c_char).unwrap() }; assert_eq!(1, env.len()); assert_eq!(Some("abc"), env.get("foo").map(|s| &s[..])); |
