From 08ff81b09aa8c5c54c3ff7cb8eaeb682955f1be9 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 3 Jan 2022 13:05:19 -0500 Subject: [PATCH] Fix warnings. --- components/gfx/platform/macos/font_context.rs | 4 ++-- components/net/fetch/methods.rs | 2 -- components/net/filemanager_thread.rs | 4 ++-- components/net/http_loader.rs | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/gfx/platform/macos/font_context.rs b/components/gfx/platform/macos/font_context.rs index f2e2cf04953..753cb97a572 100644 --- a/components/gfx/platform/macos/font_context.rs +++ b/components/gfx/platform/macos/font_context.rs @@ -6,13 +6,13 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps}; #[derive(Clone, Debug)] pub struct FontContextHandle { - ctx: (), + _ctx: (), } impl FontContextHandle { // this is a placeholder until NSFontManager or whatever is bound in here. pub fn new() -> FontContextHandle { - FontContextHandle { ctx: () } + FontContextHandle { _ctx: () } } } diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs index 2d9818a0770..a7d82cac318 100644 --- a/components/net/fetch/methods.rs +++ b/components/net/fetch/methods.rs @@ -12,8 +12,6 @@ use crate::subresource_integrity::is_response_integrity_valid; use content_security_policy as csp; use crossbeam_channel::Sender; use devtools_traits::DevtoolsControlMsg; -use futures_util::compat::*; -use futures_util::StreamExt; use headers::{AccessControlExposeHeaders, ContentType, HeaderMapExt, Range}; use http::header::{self, HeaderMap, HeaderName}; use hyper::Method; diff --git a/components/net/filemanager_thread.rs b/components/net/filemanager_thread.rs index d56bdd54668..a1e8ff40116 100644 --- a/components/net/filemanager_thread.rs +++ b/components/net/filemanager_thread.rs @@ -57,7 +57,7 @@ struct FileStoreEntry { struct FileMetaData { path: PathBuf, /// Modified time in UNIX Epoch format - modified: u64, + _modified: u64, size: u64, } @@ -660,7 +660,7 @@ impl FileManagerStore { let file_impl = FileImpl::MetaDataOnly(FileMetaData { path: file_path.to_path_buf(), - modified: modified_epoch, + _modified: modified_epoch, size: file_size, }); diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index 7950f711e48..cb0d43c255c 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -523,7 +523,7 @@ async fn obtain_response( .replace("}", "%7D"); let request = if let Some(chunk_requester) = body { - let (mut sink, stream) = if source_is_null { + let (sink, stream) = if source_is_null { // Step 4.2 of https://fetch.spec.whatwg.org/#concept-http-network-fetch // TODO: this should not be set for HTTP/2(currently not supported?). headers.insert(TRANSFER_ENCODING, HeaderValue::from_static("chunked"));