mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Store directory path as PathBuf
instead of String
.
This commit is contained in:
parent
f0020297f5
commit
6a101921c4
2 changed files with 5 additions and 4 deletions
|
@ -89,6 +89,7 @@ use profile_traits::time;
|
|||
use script_traits::{ConstellationMsg, SWManagerSenders, ScriptMsg};
|
||||
use std::borrow::Cow;
|
||||
use std::cmp::max;
|
||||
use std::path::PathBuf;
|
||||
use std::rc::Rc;
|
||||
use std::sync::mpsc::Sender;
|
||||
use url::Url;
|
||||
|
@ -243,7 +244,7 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
|||
}
|
||||
|
||||
fn create_constellation(user_agent: Cow<'static, str>,
|
||||
config_dir: Option<String>,
|
||||
config_dir: Option<PathBuf>,
|
||||
url: Option<Url>,
|
||||
compositor_proxy: Box<CompositorProxy + Send>,
|
||||
time_profiler_chan: time::ProfilerChan,
|
||||
|
@ -259,7 +260,7 @@ fn create_constellation(user_agent: Cow<'static, str>,
|
|||
new_resource_threads(user_agent,
|
||||
devtools_chan.clone(),
|
||||
time_profiler_chan.clone(),
|
||||
config_dir.map(Into::into));
|
||||
config_dir);
|
||||
let image_cache_thread = new_image_cache_thread(public_resource_threads.sender(),
|
||||
webrender_api_sender.create_api());
|
||||
let font_cache_thread = FontCacheThread::new(public_resource_threads.sender(),
|
||||
|
|
|
@ -215,7 +215,7 @@ pub struct Opts {
|
|||
pub use_msaa: bool,
|
||||
|
||||
/// Directory for a default config directory
|
||||
pub config_dir: Option<String>,
|
||||
pub config_dir: Option<PathBuf>,
|
||||
|
||||
// don't skip any backtraces on panic
|
||||
pub full_backtraces: bool,
|
||||
|
@ -857,7 +857,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
|
|||
enable_vsync: !debug_options.disable_vsync,
|
||||
webrender_stats: debug_options.webrender_stats,
|
||||
use_msaa: debug_options.use_msaa,
|
||||
config_dir: opt_match.opt_str("config-dir"),
|
||||
config_dir: opt_match.opt_str("config-dir").map(Into::into),
|
||||
full_backtraces: debug_options.full_backtraces,
|
||||
is_printing_version: is_printing_version,
|
||||
webrender_debug: debug_options.webrender_debug,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue