mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
Script: Change script/dom/{bluetooth,canvas,html} to not rely on Deref<str> for DOMString (#39480)
This is part of the future work of implementing LazyDOMString as outlined in https://github.com/servo/servo/issues/39479. We use str() method or direct implementations on DOMString for these methods. We also change some types. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com> Testing: This is essentially just renaming a method and a type and should not change functionality. Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
1e471b9b41
commit
a4c8ffe753
23 changed files with 97 additions and 95 deletions
|
@ -217,12 +217,7 @@ impl IDBDatabaseMethods<crate::DomTypeHolder> for IDBDatabase {
|
|||
}
|
||||
|
||||
// Step 6
|
||||
if self
|
||||
.object_store_names
|
||||
.borrow()
|
||||
.iter()
|
||||
.any(|store_name| store_name.to_string() == name.to_string())
|
||||
{
|
||||
if self.object_store_names.borrow().contains(&name) {
|
||||
return Err(Error::Constraint);
|
||||
}
|
||||
|
||||
|
@ -303,19 +298,14 @@ impl IDBDatabaseMethods<crate::DomTypeHolder> for IDBDatabase {
|
|||
}
|
||||
|
||||
// Step 4
|
||||
if !self
|
||||
.object_store_names
|
||||
.borrow()
|
||||
.iter()
|
||||
.any(|store_name| store_name.to_string() == name.to_string())
|
||||
{
|
||||
if !self.object_store_names.borrow().contains(&name) {
|
||||
return Err(Error::NotFound(None));
|
||||
}
|
||||
|
||||
// Step 5
|
||||
self.object_store_names
|
||||
.borrow_mut()
|
||||
.retain(|store_name| store_name.to_string() != name.to_string());
|
||||
.retain(|store_name| *store_name != name);
|
||||
|
||||
// Step 6
|
||||
// FIXME:(arihant2math) Remove from index set ...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue