mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement URLPattern::{text, exec}
(#37044)
With this change the URLPattern API is fully implemented. I'll look into the remaining failures and then enable the preference by default. Testing: Covered by web platform tests Depends on https://github.com/servo/servo/pull/37042 --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
parent
0ed2c4816c
commit
7fd0c81f55
5 changed files with 169 additions and 3633 deletions
|
@ -7,7 +7,7 @@
|
|||
use std::cmp::Eq;
|
||||
use std::hash::Hash;
|
||||
use std::marker::Sized;
|
||||
use std::ops::Deref;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use indexmap::IndexMap;
|
||||
use js::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
|
||||
|
@ -94,11 +94,17 @@ impl<K: RecordKey, V> Record<K, V> {
|
|||
impl<K: RecordKey, V> Deref for Record<K, V> {
|
||||
type Target = IndexMap<K, V>;
|
||||
|
||||
fn deref(&self) -> &IndexMap<K, V> {
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.map
|
||||
}
|
||||
}
|
||||
|
||||
impl<K: RecordKey, V> DerefMut for Record<K, V> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.map
|
||||
}
|
||||
}
|
||||
|
||||
impl<K, V, C> FromJSValConvertible for Record<K, V>
|
||||
where
|
||||
K: RecordKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue