mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: code lint
This commit is contained in:
parent
4b20b65a22
commit
3bcd8b8b2c
|
@ -127,7 +127,7 @@ pub fn parse_check_output(log: String) -> String {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_parse_check_output() {
|
fn test_parse_check_output() {
|
||||||
let str1 = r#"xxxx\n time="2022-11-18T20:42:58+08:00" level=error msg="proxy 0: 'alpn' expected type 'string', got unconvertible type '[]interface {}'""#;
|
let str1 = r#"xxxx\n time="2022-11-18T20:42:58+08:00" level=error msg="proxy 0: 'alpn' expected type 'string', got unconvertible type '[]interface {}'""#;
|
||||||
let str2 = r#"20:43:49 ERR [Config] configuration file test failed error=proxy 0: unsupport proxy type: hysteria path=xxx"#;
|
//let str2 = r#"20:43:49 ERR [Config] configuration file test failed error=proxy 0: unsupport proxy type: hysteria path=xxx"#;
|
||||||
let str3 = r#"
|
let str3 = r#"
|
||||||
"time="2022-11-18T21:38:01+08:00" level=info msg="Start initial configuration in progress"
|
"time="2022-11-18T21:38:01+08:00" level=info msg="Start initial configuration in progress"
|
||||||
time="2022-11-18T21:38:01+08:00" level=error msg="proxy 0: 'alpn' expected type 'string', got unconvertible type '[]interface {}'"
|
time="2022-11-18T21:38:01+08:00" level=error msg="proxy 0: 'alpn' expected type 'string', got unconvertible type '[]interface {}'"
|
||||||
|
|
|
@ -54,7 +54,7 @@ fn test_merge() -> anyhow::Result<()> {
|
||||||
let merge = serde_yaml::from_str::<Mapping>(merge)?;
|
let merge = serde_yaml::from_str::<Mapping>(merge)?;
|
||||||
let config = serde_yaml::from_str::<Mapping>(config)?;
|
let config = serde_yaml::from_str::<Mapping>(config)?;
|
||||||
|
|
||||||
let result = serde_yaml::to_string(&use_merge(merge, config))?;
|
let _ = serde_yaml::to_string(&use_merge(merge, config))?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ fn test_script() {
|
||||||
let config = serde_yaml::from_str(config).unwrap();
|
let config = serde_yaml::from_str(config).unwrap();
|
||||||
let (config, results) = use_script(script.into(), config, "".to_string()).unwrap();
|
let (config, results) = use_script(script.into(), config, "".to_string()).unwrap();
|
||||||
|
|
||||||
let config_str = serde_yaml::to_string(&config).unwrap();
|
let _ = serde_yaml::to_string(&config).unwrap();
|
||||||
|
|
||||||
dbg!(results);
|
dbg!(results);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user