mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
This commit is contained in:
parent
413da4ca69
commit
aad2dccc9c
802 changed files with 6861 additions and 6395 deletions
|
@ -5,6 +5,14 @@
|
|||
//! Configuration options for a single run of the servo application. Created
|
||||
//! from command line arguments.
|
||||
|
||||
use std::default::Default;
|
||||
use std::fs::{self, File};
|
||||
use std::io::{self, Read, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{RwLock, RwLockReadGuard};
|
||||
use std::{env, process};
|
||||
|
||||
use euclid::Size2D;
|
||||
use getopts::{Matches, Options};
|
||||
use lazy_static::lazy_static;
|
||||
|
@ -12,14 +20,6 @@ use log::error;
|
|||
use serde::{Deserialize, Serialize};
|
||||
use servo_geometry::DeviceIndependentPixel;
|
||||
use servo_url::ServoUrl;
|
||||
use std::default::Default;
|
||||
use std::env;
|
||||
use std::fs::{self, File};
|
||||
use std::io::{self, Read, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::{RwLock, RwLockReadGuard};
|
||||
use url::{self, Url};
|
||||
|
||||
use crate::{pref, set_pref};
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
use std::str::FromStr;
|
||||
use std::sync::RwLock;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
|
||||
pub enum PrefValue {
|
||||
Float(f64),
|
||||
|
|
|
@ -2,15 +2,16 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use lazy_static::lazy_static;
|
||||
use serde_json::{self, Value};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use embedder_traits::resources::{self, Resource};
|
||||
use gen::Prefs;
|
||||
use lazy_static::lazy_static;
|
||||
use serde_json::{self, Value};
|
||||
|
||||
use crate::pref_util::Preferences;
|
||||
pub use crate::pref_util::{PrefError, PrefValue};
|
||||
use gen::Prefs;
|
||||
|
||||
lazy_static! {
|
||||
static ref PREFS: Preferences<'static, Prefs> = {
|
||||
|
|
|
@ -2,14 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use servo_config::basedir;
|
||||
use servo_config::pref_util::Preferences;
|
||||
use servo_config::prefs::{read_prefs_map, PrefValue};
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
use std::fs::{self, File};
|
||||
use std::io::{Read, Write};
|
||||
|
||||
use servo_config::basedir;
|
||||
use servo_config::pref_util::Preferences;
|
||||
use servo_config::prefs::{read_prefs_map, PrefValue};
|
||||
|
||||
#[test]
|
||||
fn test_create_prefs_map() {
|
||||
let json_str = "{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue