mirror of
https://github.com/servo/servo.git
synced 2025-09-23 13:20:11 +01:00
build(deps): bump data-url from 0.3.1 to 0.3.2 (#38862)
Bumps [data-url](https://github.com/servo/rust-url) from 0.3.1 to 0.3.2. <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/servo/rust-url/commits">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Euclid Ye <euclid.ye@huawei.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
10ca3b6fde
commit
c2f664d16e
16 changed files with 17 additions and 42 deletions
|
@ -198,7 +198,7 @@ use crate::fetch::FetchCanceller;
|
|||
use crate::iframe_collection::IFrameCollection;
|
||||
use crate::image_animation::ImageAnimationManager;
|
||||
use crate::messaging::{CommonScriptMsg, MainThreadScriptMsg};
|
||||
use crate::mime::{APPLICATION, CHARSET, MimeExt};
|
||||
use crate::mime::{APPLICATION, CHARSET};
|
||||
use crate::network_listener::{NetworkListener, PreInvoke};
|
||||
use crate::realms::{AlreadyInRealm, InRealm, enter_realm};
|
||||
use crate::script_runtime::{CanGc, ScriptThreadEventCategory};
|
||||
|
|
|
@ -13,13 +13,6 @@ pub(crate) static XML: &str = "xml";
|
|||
|
||||
/// Convenience methods to make the data_url Mime type more ergonomic.
|
||||
pub(crate) trait MimeExt {
|
||||
/// Creates a new Mime from type and subtype, without any parameter.
|
||||
fn new(type_: &str, subtype: &str) -> Self;
|
||||
|
||||
/// Checks that this Mime matches a given type and subtype, ignoring
|
||||
/// parameters.
|
||||
fn matches(&self, type_: &str, subtype: &str) -> bool;
|
||||
|
||||
/// Checks that the subtype has a given suffix.
|
||||
/// Eg. image/svg+xml has the the xml suffix.
|
||||
fn has_suffix(&self, suffix: &str) -> bool;
|
||||
|
@ -32,18 +25,6 @@ pub(crate) trait MimeExt {
|
|||
}
|
||||
|
||||
impl MimeExt for Mime {
|
||||
fn new(type_: &str, subtype: &str) -> Self {
|
||||
Mime {
|
||||
type_: type_.into(),
|
||||
subtype: subtype.into(),
|
||||
parameters: vec![],
|
||||
}
|
||||
}
|
||||
|
||||
fn matches(&self, type_: &str, subtype: &str) -> bool {
|
||||
self.type_ == type_ && self.subtype == subtype
|
||||
}
|
||||
|
||||
fn has_suffix(&self, suffix: &str) -> bool {
|
||||
self.subtype.ends_with(&format!("+{}", suffix))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue