mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-07-28 18:53:59 +08:00
update Rust
This commit is contained in:
@ -43,12 +43,12 @@ impl Iterator for SocketAddrs {
|
||||
}
|
||||
}
|
||||
|
||||
fn new_resolver() -> io::Result<TokioAsyncResolver> {
|
||||
fn new_resolver() -> anyhow::Result<TokioAsyncResolver> {
|
||||
let ali_ips: &[IpAddr] = &[
|
||||
IpAddr::V4(Ipv4Addr::new(223, 5, 5, 5)),
|
||||
IpAddr::V4(Ipv4Addr::new(223, 6, 6, 6)),
|
||||
IpAddr::V6("2400:3200::1".parse::<Ipv6Addr>().unwrap()),
|
||||
IpAddr::V6("2400:3200:baba::1".parse::<Ipv6Addr>().unwrap()),
|
||||
IpAddr::V6("2400:3200::1".parse::<Ipv6Addr>()?),
|
||||
IpAddr::V6("2400:3200:baba::1".parse::<Ipv6Addr>()?),
|
||||
];
|
||||
|
||||
let group =
|
||||
|
@ -48,7 +48,7 @@ pub async fn fetch(
|
||||
url: String,
|
||||
headers: Option<HashMap<String, String>>,
|
||||
input_data: Option<Vec<u8>>,
|
||||
) -> reqwest::Result<RustHttpResponse> {
|
||||
) -> anyhow::Result<RustHttpResponse> {
|
||||
let mut req = _mix_header(HTTP_CLIENT.request(method, url), headers);
|
||||
if input_data.is_some() {
|
||||
req = req.body(input_data.unwrap());
|
||||
|
Reference in New Issue
Block a user