servo: Merge #17185 - Fix some "unused" warnings (from servo:unused); r=emilio
authorSimon Sapin <simon.sapin@exyr.org>
Tue, 06 Jun 2017 08:13:39 -0700
changeset 410653 c6508a9f0fb5f1648b37f299be7f3e481cb26c31
parent 410652 4a2407f32c27960136418b03e479c3703fd29e94
child 410654 fad0b0be486a2c44198a025983f4ad138d02ec8b
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17185 - Fix some "unused" warnings (from servo:unused); r=emilio Source-Repo: https://github.com/servo/servo Source-Revision: 87005a0df33531995635728989c929572de429e7
servo/Cargo.lock
servo/components/selectors/matching.rs
servo/tests/unit/layout/Cargo.toml
servo/tests/unit/layout/lib.rs
servo/tests/unit/net/lib.rs
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -1451,19 +1451,17 @@ dependencies = [
  "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.40.0 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "layout_tests"
 version = "0.0.1"
 dependencies = [
- "atomic_refcell 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "layout 0.0.1",
- "script_layout_interface 0.0.1",
  "size_of_test 0.0.1",
 ]
 
 [[package]]
 name = "layout_thread"
 version = "0.0.1"
 dependencies = [
  "app_units 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
--- a/servo/components/selectors/matching.rs
+++ b/servo/components/selectors/matching.rs
@@ -514,27 +514,16 @@ fn matches_simple_selector<E, F>(
         element: &E,
         context: &mut MatchingContext,
         relevant_link: &RelevantLinkStatus,
         flags_setter: &mut F)
         -> bool
     where E: Element,
           F: FnMut(&E, ElementSelectorFlags),
 {
-    macro_rules! relation_if {
-        ($ex:expr, $flag:ident) => {
-            if $ex {
-                context.relations |= $flag;
-                true
-            } else {
-                false
-            }
-        }
-    }
-
     match *selector {
         Component::Combinator(_) => unreachable!(),
         Component::PseudoElement(ref pseudo) => {
             element.match_pseudo_element(pseudo, context)
         }
         Component::LocalName(LocalName { ref name, ref lower_name }) => {
             let is_html = element.is_html_element_in_html_document();
             element.get_local_name() == select_name(is_html, name, lower_name).borrow()
--- a/servo/tests/unit/layout/Cargo.toml
+++ b/servo/tests/unit/layout/Cargo.toml
@@ -5,12 +5,10 @@ authors = ["The Servo Project Developers
 license = "MPL-2.0"
 
 [lib]
 name = "layout_tests"
 path = "lib.rs"
 doctest = false
 
 [dependencies]
-atomic_refcell = "0.1"
 layout = {path = "../../../components/layout"}
-script_layout_interface = {path = "../../../components/script_layout_interface"}
 size_of_test = {path = "../../../components/size_of_test"}
--- a/servo/tests/unit/layout/lib.rs
+++ b/servo/tests/unit/layout/lib.rs
@@ -1,10 +1,8 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-extern crate atomic_refcell;
 extern crate layout;
-extern crate script_layout_interface;
 #[macro_use] extern crate size_of_test;
 
 #[cfg(all(test, target_pointer_width = "64"))] mod size_of;
--- a/servo/tests/unit/net/lib.rs
+++ b/servo/tests/unit/net/lib.rs
@@ -29,17 +29,17 @@ extern crate url;
 #[cfg(test)] mod resource_thread;
 #[cfg(test)] mod hsts;
 #[cfg(test)] mod http_loader;
 #[cfg(test)] mod filemanager_thread;
 #[cfg(test)] mod subresource_integrity;
 
 use devtools_traits::DevtoolsControlMsg;
 use hyper::server::{Handler, Listening, Server};
-use net::connector::{create_http_connector, create_ssl_client};
+use net::connector::create_ssl_client;
 use net::fetch::cors_cache::CorsCache;
 use net::fetch::methods::{self, FetchContext};
 use net::filemanager_thread::FileManager;
 use net::test::HttpState;
 use net_traits::FetchTaskTarget;
 use net_traits::request::Request;
 use net_traits::response::Response;
 use servo_config::resource_files::resources_dir_path;