style: Export a size to fix a test that was trying to use a now-private type.

This commit is contained in:
Emilio Cobos Álvarez 2020-04-18 04:32:33 +02:00
parent faa9dccfe8
commit ad602a0fa8
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 4 additions and 1 deletions

View file

@ -202,6 +202,9 @@ impl RuleTree {
/// where it likely did not result from a rigorous performance analysis.) /// where it likely did not result from a rigorous performance analysis.)
const RULE_TREE_GC_INTERVAL: usize = 300; const RULE_TREE_GC_INTERVAL: usize = 300;
/// Used for some size assertions.
pub const RULE_NODE_SIZE: usize = std::mem::size_of::<RuleNode>();
/// A node in the rule tree. /// A node in the rule tree.
struct RuleNode { struct RuleNode {
/// The root node. Only the root has no root pointer, for obvious reasons. /// The root node. Only the root has no root pointer, for obvious reasons.

View file

@ -19,7 +19,7 @@ mod map;
mod source; mod source;
mod unsafe_box; mod unsafe_box;
pub use self::core::{RuleTree, StrongRuleNode}; pub use self::core::{RuleTree, StrongRuleNode, RULE_NODE_SIZE};
pub use self::level::{CascadeLevel, ShadowCascadeOrder}; pub use self::level::{CascadeLevel, ShadowCascadeOrder};
pub use self::source::StyleSource; pub use self::source::StyleSource;