mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix some new warnings
This commit is contained in:
parent
112f1ddeba
commit
1d38bc0419
65 changed files with 179 additions and 175 deletions
|
@ -6,10 +6,11 @@ use std::path::PathBuf;
|
|||
use std::sync::{Once, RwLock};
|
||||
|
||||
lazy_static! {
|
||||
static ref RES: RwLock<Option<Box<ResourceReaderMethods + Sync + Send>>> = RwLock::new(None);
|
||||
static ref RES: RwLock<Option<Box<dyn ResourceReaderMethods + Sync + Send>>> =
|
||||
RwLock::new(None);
|
||||
}
|
||||
|
||||
pub fn set(reader: Box<ResourceReaderMethods + Sync + Send>) {
|
||||
pub fn set(reader: Box<dyn ResourceReaderMethods + Sync + Send>) {
|
||||
*RES.write().unwrap() = Some(reader);
|
||||
}
|
||||
|
||||
|
@ -67,7 +68,7 @@ pub trait ResourceReaderMethods {
|
|||
fn sandbox_access_files_dirs(&self) -> Vec<PathBuf>;
|
||||
}
|
||||
|
||||
fn resources_for_tests() -> Box<ResourceReaderMethods + Sync + Send> {
|
||||
fn resources_for_tests() -> Box<dyn ResourceReaderMethods + Sync + Send> {
|
||||
use std::env;
|
||||
use std::fs::File;
|
||||
use std::io::Read;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue