Switch some tuple structs to pub fields

This commit deals with the fallout of the previous change by making tuples
structs have public fields where necessary (now that the fields are private by
default).
This commit is contained in:
Alex Crichton 2014-03-31 19:01:01 -07:00
parent 683197975c
commit 922dcfdc69
25 changed files with 56 additions and 48 deletions

View file

@ -17,7 +17,7 @@ use std::fmt;
/// Wrapper struct which will emit the HTML-escaped version of the contained
/// string when passed to a format string.
pub struct Escape<'a>(&'a str);
pub struct Escape<'a>(pub &'a str);
impl<'a> fmt::Show for Escape<'a> {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {

View file

@ -28,12 +28,12 @@ use html::render::{cache_key, current_location_key};
/// Helper to render an optional visibility with a space after it (if the
/// visibility is preset)
pub struct VisSpace(Option<ast::Visibility>);
pub struct VisSpace(pub Option<ast::Visibility>);
/// Similarly to VisSpace, this structure is used to render a purity with a
/// space after it.
pub struct PuritySpace(ast::Purity);
pub struct PuritySpace(pub ast::Purity);
/// Wrapper struct for properly emitting a method declaration.
pub struct Method<'a>(&'a clean::SelfTy, &'a clean::FnDecl);
pub struct Method<'a>(pub &'a clean::SelfTy, pub &'a clean::FnDecl);
impl VisSpace {
pub fn get(&self) -> Option<ast::Visibility> {

View file

@ -42,10 +42,10 @@ use html::highlight;
/// A unit struct which has the `fmt::Show` trait implemented. When
/// formatted, this struct will emit the HTML corresponding to the rendered
/// version of the contained markdown string.
pub struct Markdown<'a>(&'a str);
pub struct Markdown<'a>(pub &'a str);
/// A unit struct like `Markdown`, that renders the markdown with a
/// table of contents.
pub struct MarkdownWithToc<'a>(&'a str);
pub struct MarkdownWithToc<'a>(pub &'a str);
static OUTPUT_UNIT: libc::size_t = 64;
static MKDEXT_NO_INTRA_EMPHASIS: libc::c_uint = 1 << 0;