util: Rename ops::set_opts to ops::set, to match get

This commit is contained in:
Brian Anderson 2015-05-09 02:12:23 -07:00
parent 8975a3bd9b
commit f8bbc0a974
2 changed files with 4 additions and 4 deletions

View file

@ -400,7 +400,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool {
disable_share_style_cache: debug_options.contains(&"disable-share-style-cache"), disable_share_style_cache: debug_options.contains(&"disable-share-style-cache"),
}; };
set_opts(opts); set(opts);
true true
} }
@ -423,7 +423,7 @@ pub fn experimental_enabled() -> bool {
// when passing through the DOM structures. // when passing through the DOM structures.
static mut OPTIONS: *mut Opts = 0 as *mut Opts; static mut OPTIONS: *mut Opts = 0 as *mut Opts;
pub fn set_opts(opts: Opts) { pub fn set(opts: Opts) {
unsafe { unsafe {
assert!(OPTIONS.is_null()); assert!(OPTIONS.is_null());
let box_opts = box opts; let box_opts = box opts;
@ -439,7 +439,7 @@ pub fn get<'a>() -> &'a Opts {
// set of options. This is mostly useful for unit tests that // set of options. This is mostly useful for unit tests that
// run through a code path which queries the cmd line options. // run through a code path which queries the cmd line options.
if OPTIONS == ptr::null_mut() { if OPTIONS == ptr::null_mut() {
set_opts(default_opts()); set(default_opts());
} }
mem::transmute(OPTIONS) mem::transmute(OPTIONS)
} }

View file

@ -78,7 +78,7 @@ pub extern "C" fn cef_initialize(args: *const cef_main_args_t,
temp_opts.hard_fail = false; temp_opts.hard_fail = false;
temp_opts.enable_text_antialiasing = true; temp_opts.enable_text_antialiasing = true;
temp_opts.resources_path = resources_path(); temp_opts.resources_path = resources_path();
opts::set_opts(temp_opts); opts::set(temp_opts);
return 1 return 1
} }