Allow setting preferences from the reftest manifest. Add a command-line arg to enable a given preference.

This commit is contained in:
Josh Matthews 2015-08-27 10:56:36 -04:00
parent a3ee9b5dd9
commit 6e26fefad1
5 changed files with 30 additions and 16 deletions

View file

@ -45,6 +45,6 @@ pub fn get_pref(name: &str, default: bool) -> bool {
*PREFS.lock().unwrap().get(name).unwrap_or(&default)
}
pub fn set_pref(name: String, value: bool) {
let _ = PREFS.lock().unwrap().insert(name, value);
pub fn set_pref(name: &str, value: bool) {
let _ = PREFS.lock().unwrap().insert(name.to_owned(), value);
}