Fix some private type in public signature warnings.

This commit is contained in:
Josh Matthews 2014-04-13 17:12:25 -04:00
parent b174a6439b
commit d04efe6037
14 changed files with 27 additions and 25 deletions

View file

@ -15,7 +15,7 @@ use std::mem;
/// needs it. /// needs it.
pub struct BufferMap<T> { pub struct BufferMap<T> {
/// A HashMap that stores the Buffers. /// A HashMap that stores the Buffers.
map: HashMap<BufferKey, BufferValue<T>>, priv map: HashMap<BufferKey, BufferValue<T>>,
/// The current amount of memory stored by the BufferMap's buffers. /// The current amount of memory stored by the BufferMap's buffers.
mem: uint, mem: uint,
/// The maximum allowed memory. Unused buffers will be deleted /// The maximum allowed memory. Unused buffers will be deleted

View file

@ -46,7 +46,7 @@ impl FontTableMethods for FontTable {
} }
} }
enum FontSource { pub enum FontSource {
FontSourceMem(~[u8]), FontSourceMem(~[u8]),
FontSourceFile(~str) FontSourceFile(~str)
} }

View file

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#[allow(uppercase_variables)];
extern crate freetype; extern crate freetype;
extern crate fontconfig; extern crate fontconfig;

View file

@ -106,7 +106,7 @@ impl RenderChan {
/// If we're using GPU rendering, this provides the metadata needed to create a GL context that /// If we're using GPU rendering, this provides the metadata needed to create a GL context that
/// is compatible with that of the main thread. /// is compatible with that of the main thread.
enum GraphicsContext { pub enum GraphicsContext {
CpuGraphicsContext, CpuGraphicsContext,
GpuGraphicsContext, GpuGraphicsContext,
} }
@ -138,7 +138,7 @@ pub struct RenderTask<C> {
epoch: Epoch, epoch: Epoch,
/// A data structure to store unused LayerBuffers /// A data structure to store unused LayerBuffers
buffer_map: BufferMap<~LayerBuffer>, priv buffer_map: BufferMap<~LayerBuffer>,
} }
// If we implement this as a function, we get borrowck errors from borrowing // If we implement this as a function, we get borrowck errors from borrowing

View file

@ -460,7 +460,7 @@ impl GlyphData {
// through glyphs (either for a particular TextRun offset, or all glyphs). // through glyphs (either for a particular TextRun offset, or all glyphs).
// Rather than eagerly assembling and copying glyph data, it only retrieves // Rather than eagerly assembling and copying glyph data, it only retrieves
// values as they are needed from the GlyphStore, using provided offsets. // values as they are needed from the GlyphStore, using provided offsets.
enum GlyphInfo<'a> { pub enum GlyphInfo<'a> {
SimpleGlyphInfo(&'a GlyphStore, uint), SimpleGlyphInfo(&'a GlyphStore, uint),
DetailGlyphInfo(&'a GlyphStore, uint, u16) DetailGlyphInfo(&'a GlyphStore, uint, u16)
} }
@ -500,9 +500,9 @@ impl<'a> GlyphInfo<'a> {
pub struct GlyphStore { pub struct GlyphStore {
// TODO(pcwalton): Allocation of this buffer is expensive. Consider a small-vector // TODO(pcwalton): Allocation of this buffer is expensive. Consider a small-vector
// optimization. // optimization.
entry_buffer: ~[GlyphEntry], priv entry_buffer: ~[GlyphEntry],
detail_store: DetailedGlyphStore, priv detail_store: DetailedGlyphStore,
is_whitespace: bool, is_whitespace: bool,
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#[deriving(Eq)] #[deriving(Eq)]
enum CompressionMode { pub enum CompressionMode {
CompressNone, CompressNone,
CompressWhitespace, CompressWhitespace,
CompressWhitespaceNewline, CompressWhitespaceNewline,

View file

@ -145,15 +145,15 @@ fn create_resource_task_with_loaders(loaders: ~[(~str, LoaderTaskFactory)]) -> R
setup_port.recv() setup_port.recv()
} }
pub struct ResourceManager { struct ResourceManager {
from_client: Receiver<ControlMsg>, from_client: Receiver<ControlMsg>,
/// Per-scheme resource loaders /// Per-scheme resource loaders
loaders: ~[(~str, LoaderTaskFactory)], loaders: ~[(~str, LoaderTaskFactory)],
} }
pub fn ResourceManager(from_client: Receiver<ControlMsg>, fn ResourceManager(from_client: Receiver<ControlMsg>,
loaders: ~[(~str, LoaderTaskFactory)]) -> ResourceManager { loaders: ~[(~str, LoaderTaskFactory)]) -> ResourceManager {
ResourceManager { ResourceManager {
from_client : from_client, from_client : from_client,
loaders : loaders, loaders : loaders,

View file

@ -25,13 +25,13 @@ pub struct MediaQueryList {
} }
// For now, this is a "Level 2 MQ", ie. a media type. // For now, this is a "Level 2 MQ", ie. a media type.
struct MediaQuery { pub struct MediaQuery {
media_type: MediaQueryType, media_type: MediaQueryType,
// TODO: Level 3 MQ expressions // TODO: Level 3 MQ expressions
} }
enum MediaQueryType { pub enum MediaQueryType {
All, // Always true All, // Always true
MediaType(MediaType), MediaType(MediaType),
} }

View file

@ -4,7 +4,7 @@
// This file is a Mako template: http://www.makotemplates.org/ // This file is a Mako template: http://www.makotemplates.org/
#[allow(non_camel_case_types)]; #[allow(non_camel_case_types, uppercase_variables)];
pub use servo_util::url::parse_url; pub use servo_util::url::parse_url;
use sync::Arc; use sync::Arc;
@ -1332,7 +1332,7 @@ pub enum PropertyDeclaration {
} }
enum PropertyDeclarationParseResult { pub enum PropertyDeclarationParseResult {
UnknownProperty, UnknownProperty,
InvalidValue, InvalidValue,
ValidDeclaration, ValidDeclaration,

View file

@ -26,15 +26,19 @@ extern crate url;
// Public API // Public API
pub use stylesheets::Stylesheet; pub use stylesheets::{Stylesheet, CSSRule, StyleRule};
pub use selector_matching::{Stylist, StylesheetOrigin, UserAgentOrigin, AuthorOrigin, UserOrigin}; pub use selector_matching::{Stylist, StylesheetOrigin, UserAgentOrigin, AuthorOrigin, UserOrigin};
pub use selector_matching::{MatchedProperty}; pub use selector_matching::{MatchedProperty};
pub use properties::{cascade, PropertyDeclaration, ComputedValues, computed_values}; pub use properties::{cascade, PropertyDeclaration, ComputedValues, computed_values, style_structs};
pub use properties::{PropertyDeclarationBlock, parse_style_attribute}; // Style attributes pub use properties::{PropertyDeclarationBlock, parse_style_attribute}; // Style attributes
pub use properties::{initial_values}; pub use properties::{initial_values, CSSFloat, DeclaredValue, PropertyDeclarationParseResult};
pub use properties::longhands;
pub use errors::with_errors_silenced; pub use errors::with_errors_silenced;
pub use node::{TElement, TNode}; pub use node::{TElement, TNode};
pub use selectors::{PseudoElement, Before, After, AttrSelector, SpecificNamespace, AnyNamespace}; pub use selectors::{PseudoElement, Before, After, AttrSelector, SpecificNamespace, AnyNamespace};
pub use selectors::{NamespaceConstraint, Selector, CompoundSelector, SimpleSelector, Combinator};
pub use namespaces::NamespaceMap;
pub use media_queries::{MediaRule, MediaQueryList, MediaQuery, Device, MediaType, MediaQueryType};
mod stylesheets; mod stylesheets;
mod errors; mod errors;

View file

@ -2,10 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#[feature(phase)];
#[phase(syntax, link)]
extern crate log;
use std::io; use std::io;
use std::io::Writer; use std::io::Writer;
use std::cast::transmute; use std::cast::transmute;

View file

@ -6,7 +6,7 @@ use std::cmp::{max, min};
use std::iter; use std::iter;
use std::fmt; use std::fmt;
enum RangeRelation { pub enum RangeRelation {
OverlapsBegin(/* overlap */ uint), OverlapsBegin(/* overlap */ uint),
OverlapsEnd(/* overlap */ uint), OverlapsEnd(/* overlap */ uint),
ContainedBy, ContainedBy,

View file

@ -105,7 +105,7 @@ type ProfilerBuckets = TreeMap<ProfilerCategory, ~[f64]>;
// back end of the profiler that handles data aggregation and performance metrics // back end of the profiler that handles data aggregation and performance metrics
pub struct Profiler { pub struct Profiler {
port: Receiver<ProfilerMsg>, port: Receiver<ProfilerMsg>,
buckets: ProfilerBuckets, priv buckets: ProfilerBuckets,
last_msg: Option<ProfilerMsg>, last_msg: Option<ProfilerMsg>,
} }

View file

@ -69,7 +69,7 @@ fn test_options(config: Config) -> TestOpts {
} }
fn find_tests(config: Config) -> Vec<TestDescAndFn> { fn find_tests(config: Config) -> Vec<TestDescAndFn> {
let mut files_res = fs::readdir(&Path::new(config.source_dir)); let files_res = fs::readdir(&Path::new(config.source_dir));
let mut files = match files_res { let mut files = match files_res {
Ok(files) => files, Ok(files) => files,
_ => fail!("Error reading directory."), _ => fail!("Error reading directory."),