mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
cargo fmt fixes
This commit is contained in:
parent
3dfe8e6522
commit
cd8bcacfe1
@ -127,9 +127,11 @@ pub extern "C" fn protocol_list_supports_protocol_or_later(
|
|||||||
Err(_) => return 0,
|
Err(_) => return 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
let is_supported =
|
let is_supported = protover_string_supports_protocol_or_later(
|
||||||
protover_string_supports_protocol_or_later(
|
protocol_list,
|
||||||
protocol_list, protocol, version);
|
protocol,
|
||||||
|
version,
|
||||||
|
);
|
||||||
|
|
||||||
return if is_supported { 1 } else { 0 };
|
return if is_supported { 1 } else { 0 };
|
||||||
}
|
}
|
||||||
|
@ -496,9 +496,7 @@ fn find_range(list: &Vec<u32>) -> (bool, u32) {
|
|||||||
/// A `String` representation of this set in ascending order.
|
/// A `String` representation of this set in ascending order.
|
||||||
///
|
///
|
||||||
fn contract_protocol_list<'a>(supported_set: &'a HashSet<u32>) -> String {
|
fn contract_protocol_list<'a>(supported_set: &'a HashSet<u32>) -> String {
|
||||||
let mut supported: Vec<u32> = supported_set.iter()
|
let mut supported: Vec<u32> = supported_set.iter().map(|x| *x).collect();
|
||||||
.map(|x| *x)
|
|
||||||
.collect();
|
|
||||||
supported.sort();
|
supported.sort();
|
||||||
|
|
||||||
let mut final_output: Vec<String> = Vec::new();
|
let mut final_output: Vec<String> = Vec::new();
|
||||||
|
Loading…
Reference in New Issue
Block a user