mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove unused code from script* crates
This commit is contained in:
parent
8dc7a25893
commit
8b6ed3d182
13 changed files with 2 additions and 133 deletions
|
@ -25,19 +25,6 @@ pub enum LoadType {
|
|||
Media,
|
||||
}
|
||||
|
||||
impl LoadType {
|
||||
fn url(&self) -> Option<&ServoUrl> {
|
||||
match *self {
|
||||
LoadType::Image(ref url) |
|
||||
LoadType::Script(ref url) |
|
||||
LoadType::Subframe(ref url) |
|
||||
LoadType::Stylesheet(ref url) |
|
||||
LoadType::PageSource(ref url) => Some(url),
|
||||
LoadType::Media => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Canary value ensuring that manually added blocking loads (ie. ones that weren't
|
||||
/// created via DocumentLoader::fetch_async) are always removed by the time
|
||||
/// that the owner is destroyed.
|
||||
|
@ -67,11 +54,6 @@ impl LoadBlocker {
|
|||
}
|
||||
*blocker = None;
|
||||
}
|
||||
|
||||
/// Return the url associated with this load.
|
||||
pub fn url(&self) -> Option<&ServoUrl> {
|
||||
self.load.as_ref().and_then(LoadType::url)
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for LoadBlocker {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue