Skip to content

Commit

Permalink
Fix/silence some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Dec 20, 2016
1 parent 01442ba commit 53f5023
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/net/image_cache_thread.rs
Expand Up @@ -5,7 +5,7 @@
use immeta::load_from_buf;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
use net_traits::{CoreResourceThread, NetworkError, fetch_async, FetchResponseMsg, FetchMetadata, Metadata};
use net_traits::{CoreResourceThread, NetworkError, fetch_async, FetchResponseMsg};
use net_traits::image::base::{Image, ImageMetadata, PixelFormat, load_from_memory};
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheCommand, ImageCacheThread, ImageState};
use net_traits::image_cache_thread::{ImageCacheResult, ImageOrMetadataAvailable, ImageResponse, UsePlaceholder};
Expand Down
4 changes: 3 additions & 1 deletion components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -4260,7 +4260,9 @@ def try_method(self, t):

return CGWrapper(
CGIndenter(jsConversion, 4),
pre="unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n" % (t.name, returnType),
# TryConvertToObject is unused, but not generating it while generating others is tricky.
pre="#[allow(dead_code)] unsafe fn TryConvertTo%s(cx: *mut JSContext, value: HandleValue) -> %s {\n"
% (t.name, returnType),
post="\n}")

def define(self):
Expand Down
3 changes: 2 additions & 1 deletion components/script/dom/htmlmediaelement.rs
Expand Up @@ -437,6 +437,7 @@ impl HTMLMediaElement {
}

// https://html.spec.whatwg.org/multipage/#concept-media-load-algorithm
#[allow(unreachable_code)]
fn resource_selection_algorithm_sync(&self, base_url: ServoUrl) {
// TODO step 5 (populate pending text tracks)

Expand All @@ -446,7 +447,7 @@ impl HTMLMediaElement {
ResourceSelectionMode::Object
} else if let Some(attr) = self.upcast::<Element>().get_attribute(&ns!(), &local_name!("src")) {
ResourceSelectionMode::Attribute(attr.Value().to_string())
} else if false {
} else if false { // TODO: when implementing this remove #[allow(unreachable_code)] above.
// TODO <source> child
ResourceSelectionMode::Children(panic!())
} else {
Expand Down

0 comments on commit 53f5023

Please sign in to comment.