chore: upgrade to Rust 1.70.0 (#19345)

Co-authored-by: linbingquan <695601626@qq.com>
This commit is contained in:
David Sherret 2023-06-05 20:35:39 -04:00 committed by GitHub
parent 8829a1d362
commit 5c55f2b4fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 56 additions and 73 deletions

View file

@ -18,6 +18,7 @@ use deno_core::ModuleSpecifier;
use deno_core::OpState;
use log;
use once_cell::sync::Lazy;
use std::borrow::Cow;
use std::collections::HashSet;
use std::fmt;
use std::hash::Hash;
@ -872,8 +873,8 @@ impl UnaryPermission<NetDescriptor> {
.ok_or_else(|| uri_error("Missing host"))?
.to_string();
let display_host = match url.port() {
None => hostname.clone(),
Some(port) => format!("{hostname}:{port}"),
None => Cow::Borrowed(&hostname),
Some(port) => Cow::Owned(format!("{hostname}:{port}")),
};
let host = &(&hostname, url.port_or_known_default());
let (result, prompted, is_allow_all) = self.query(Some(host)).check(