mirror of
https://github.com/house-of-vanity/v2-uri-parser.git
synced 2025-12-15 22:47:52 +00:00
Applied clippy fixes
This commit is contained in:
@@ -56,8 +56,6 @@ pub fn create_outbound_object(uri: &str) -> config_models::Outbound {
|
||||
let allow_insecure = data.allowInsecure == Some(String::from("true"))
|
||||
|| data.allowInsecure == Some(String::from("1"));
|
||||
|
||||
|
||||
|
||||
Outbound {
|
||||
protocol: name,
|
||||
tag: String::from("proxy"),
|
||||
|
||||
@@ -8,9 +8,7 @@ use serde_json::Value;
|
||||
pub fn get_data(uri: &str) -> RawData {
|
||||
let data = uri.split_once("vmess://").unwrap().1;
|
||||
|
||||
match general_purpose::STANDARD
|
||||
.decode(url_decode_str(data).unwrap_or(String::from(data)))
|
||||
{
|
||||
match general_purpose::STANDARD.decode(url_decode_str(data).unwrap_or(String::from(data))) {
|
||||
Ok(decoded) => get_raw_data_from_base64(&decoded),
|
||||
Err(_) => get_raw_data_from_uri(data),
|
||||
}
|
||||
|
||||
@@ -24,8 +24,5 @@ pub fn parse_raw_json(input: &str) -> Option<serde_json::Value> {
|
||||
}
|
||||
|
||||
pub fn get_parameter_value(query: &Vec<(&str, &str)>, param: &str) -> Option<String> {
|
||||
query
|
||||
.iter()
|
||||
.find(|q| q.0 == param)
|
||||
.map(|q| q.1.to_string())
|
||||
query.iter().find(|q| q.0 == param).map(|q| q.1.to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user