mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Replace the lazy_static crate with std::sync::LazyLock
in components/shared (#33060)
* replace in pub_domains.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in embedder/resources.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in base/id.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * replace in net/lib.rs Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> * remove lazy_static from components/shared Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com> --------- Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
This commit is contained in:
parent
8f82b2a7cb
commit
86c4e014b4
10 changed files with 19 additions and 37 deletions
|
@ -16,9 +16,9 @@
|
|||
|
||||
use std::collections::HashSet;
|
||||
use std::iter::FromIterator;
|
||||
use std::sync::LazyLock;
|
||||
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use lazy_static::lazy_static;
|
||||
use servo_url::{Host, ImmutableOrigin, ServoUrl};
|
||||
|
||||
#[derive(Clone, Debug, Default)]
|
||||
|
@ -28,9 +28,7 @@ pub struct PubDomainRules {
|
|||
exceptions: HashSet<String>,
|
||||
}
|
||||
|
||||
lazy_static! {
|
||||
static ref PUB_DOMAINS: PubDomainRules = load_pub_domains();
|
||||
}
|
||||
static PUB_DOMAINS: LazyLock<PubDomainRules> = LazyLock::new(|| load_pub_domains());
|
||||
|
||||
impl<'a> FromIterator<&'a str> for PubDomainRules {
|
||||
fn from_iter<T>(iter: T) -> Self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue