diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-12-14 10:37:58 -0600 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-12-14 18:04:37 -0600 |
commit | 9be4fd56ce5467ce6d0e48c6efda9eb26f40eb7a (patch) | |
tree | 93d46ce512414914439920505f41467ffbc17e95 /components/util/lib.rs | |
parent | 01b6ad55bd435bc4f58e5eab2e8adb7e4febb50a (diff) | |
download | servo-9be4fd56ce5467ce6d0e48c6efda9eb26f40eb7a.tar.gz servo-9be4fd56ce5467ce6d0e48c6efda9eb26f40eb7a.zip |
Removed util.
Diffstat (limited to 'components/util/lib.rs')
-rw-r--r-- | components/util/lib.rs | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/components/util/lib.rs b/components/util/lib.rs deleted file mode 100644 index 3c72d90d257..00000000000 --- a/components/util/lib.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#![cfg_attr(feature = "servo", feature(nonzero))] -#![cfg_attr(feature = "servo", feature(plugin))] -#![cfg_attr(feature = "servo", feature(proc_macro))] -#![cfg_attr(feature = "servo", plugin(plugins))] - -#![deny(unsafe_code)] - -extern crate app_units; -#[allow(unused_extern_crates)] #[macro_use] extern crate bitflags; -extern crate core; -#[macro_use] extern crate euclid; -extern crate getopts; -#[macro_use] extern crate heapsize; -#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static; -#[macro_use] extern crate log; -extern crate num_cpus; -extern crate rustc_serialize; -#[cfg(feature = "servo")] extern crate serde; -#[cfg(feature = "servo")] #[macro_use] extern crate serde_derive; -extern crate servo_url; -extern crate url; -#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "android")))] -extern crate xdg; - -pub mod basedir; -pub mod geometry; -#[allow(unsafe_code)] pub mod opts; -pub mod prefs; -#[cfg(feature = "servo")] pub mod remutex; -pub mod resource_files; -pub mod thread; - -pub fn servo_version() -> String { - let cargo_version = env!("CARGO_PKG_VERSION"); - let git_info = option_env!("GIT_INFO"); - match git_info { - Some(info) => format!("Servo {}{}", cargo_version, info), - None => format!("Servo {}", cargo_version), - } -} - -pub fn clamp<T: Ord>(lo: T, mid: T, hi: T) -> T { - if mid < lo { - lo - } else if mid > hi { - hi - } else { - mid - } -} |