Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the cache module out of util. #12311

Merged
merged 4 commits into from Jul 8, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Move util::cache to style.

  • Loading branch information
Ms2ger committed Jul 8, 2016
commit 8dd711d3db58ea5524624a4d39eb3787ccc5cb9f

Some generated files are not rendered by default. Learn more.

@@ -2,6 +2,8 @@
* 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/. */

//! Two simple cache data structures.

use rand;
use rand::Rng;
use std::hash::{Hash, Hasher, SipHasher};
@@ -72,6 +72,7 @@ extern crate util;
pub mod animation;
pub mod attr;
pub mod bezier;
pub mod cache;
pub mod context;
pub mod custom_properties;
pub mod data;
@@ -7,6 +7,7 @@
#![allow(unsafe_code)]

use animation::{self, Animation};
use cache::{LRUCache, SimpleHashCache};
use context::{StyleContext, SharedStyleContext};
use data::PrivateStyleData;
use dom::{TElement, TNode, TRestyleDamage};
@@ -25,7 +26,6 @@ use std::slice::Iter;
use std::sync::Arc;
use string_cache::{Atom, Namespace};
use util::arc_ptr_eq;
use util::cache::{LRUCache, SimpleHashCache};
use util::opts;

fn create_common_style_affecting_attributes_from_element<E: TElement>(element: &E)
@@ -24,7 +24,6 @@ ipc-channel = {git = "https://github.com/servo/ipc-channel", optional = true}
lazy_static = "0.2"
log = "0.3.5"
num_cpus = "0.2.2"
rand = "0.3"
rustc-serialize = "0.3"
serde = {version = "0.7.11", optional = true}
serde_macros = {version = "0.7.11", optional = true}
@@ -20,7 +20,6 @@ extern crate getopts;
#[allow(unused_extern_crates)] #[macro_use] extern crate lazy_static;
#[macro_use] extern crate log;
extern crate num_cpus;
extern crate rand;
extern crate rustc_serialize;
#[cfg(feature = "servo")] extern crate serde;
extern crate url;
@@ -30,7 +29,6 @@ extern crate xdg;
use std::sync::Arc;

pub mod basedir;
pub mod cache;
pub mod geometry;
#[cfg(feature = "servo")] #[allow(unsafe_code)] pub mod ipc;
#[allow(unsafe_code)] pub mod opts;

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use std::cell::Cell;
use util::cache::LRUCache;
use style::cache::LRUCache;

#[test]
fn test_lru_cache() {
@@ -18,6 +18,7 @@ extern crate url;
extern crate util;

mod attr;
mod cache;
mod logical_geometry;
mod media_queries;
mod properties;
@@ -6,7 +6,6 @@

extern crate util;

mod cache;
mod opts;
mod prefs;
mod thread;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.