Skip to content

Commit

Permalink
Removed Unnecessary comments and white spaces #4386
Browse files Browse the repository at this point in the history
  • Loading branch information
reedlepee123 committed Oct 22, 2013
1 parent 0ada7c7 commit ad46544
Show file tree
Hide file tree
Showing 111 changed files with 226 additions and 539 deletions.
6 changes: 0 additions & 6 deletions src/libextra/arc.rs
Expand Up @@ -50,7 +50,6 @@ use std::borrow;

/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
pub struct Condvar<'self> {
// all were already priv
priv is_mutex: bool,
priv failed: &'self mut bool,
priv cond: &'self sync::Condvar<'self>
Expand Down Expand Up @@ -109,7 +108,6 @@ impl<'self> Condvar<'self> {
****************************************************************************/

/// An atomically reference counted wrapper for shared immutable state.
// all were already priv
pub struct Arc<T> { priv x: UnsafeArc<T> }


Expand Down Expand Up @@ -164,7 +162,6 @@ struct MutexArcInner<T> { priv lock: Mutex, priv failed: bool, priv data: T }

/// An Arc with mutable data protected by a blocking mutex.
#[no_freeze]
//All were already priv
pub struct MutexArc<T> { priv x: UnsafeArc<MutexArcInner<T>> }


Expand Down Expand Up @@ -347,7 +344,6 @@ struct RWArcInner<T> { priv lock: RWLock, priv failed: bool, priv data: T }
*/
#[no_freeze]
pub struct RWArc<T> {
// all were already priv
priv x: UnsafeArc<RWArcInner<T>>,
}

Expand Down Expand Up @@ -526,15 +522,13 @@ fn borrow_rwlock<T:Freeze + Send>(state: *mut RWArcInner<T>) -> *RWLock {
/// The "write permission" token used for RWArc.write_downgrade().
pub struct RWWriteMode<'self, T> {

/// reedlepee added priv in all the feilds below
priv data: &'self mut T,
priv token: sync::RWLockWriteMode<'self>,
priv poison: PoisonOnFail,
}

/// The "read permission" token used for RWArc.write_downgrade().
pub struct RWReadMode<'self, T> {
/// reedlepee added priv in all the feilds below
priv data: &'self T,
priv token: sync::RWLockReadMode<'self>,
}
Expand Down
1 change: 0 additions & 1 deletion src/libextra/arena.rs
Expand Up @@ -62,7 +62,6 @@ pub struct Arena {
// The head is separated out from the list as a unbenchmarked
// microoptimization, to avoid needing to case on the list to
// access the head.
/// no change by reedlepee all were already priv
priv head: Chunk,
priv pod_head: Chunk,
priv chunks: @mut MutList<Chunk>,
Expand Down
1 change: 0 additions & 1 deletion src/libextra/base64.rs
Expand Up @@ -21,7 +21,6 @@ pub enum CharacterSet {

/// Contains configuration parameters for `to_base64`.
pub struct Config {
/// all were made priv by reedlepee
/// Character set to use
priv char_set: CharacterSet,
/// True to pad output with `=` characters
Expand Down
4 changes: 0 additions & 4 deletions src/libextra/bitv.rs
Expand Up @@ -225,7 +225,6 @@ enum Op {Union, Intersect, Assign, Difference}
/// The bitvector type
#[deriving(Clone)]
pub struct Bitv {
/// all were made priv by reedlepee
/// Internal representation of the bit vector (small or large)
priv rep: BitvVariant,
/// The number of valid bits in the internal representation
Expand Down Expand Up @@ -574,7 +573,6 @@ fn iterate_bits(base: uint, bits: uint, f: &fn(uint) -> bool) -> bool {

/// An iterator for `Bitv`.
pub struct BitvIterator<'self> {
/// all were already priv
priv bitv: &'self Bitv,
priv next_idx: uint,
priv end_idx: uint,
Expand Down Expand Up @@ -636,7 +634,6 @@ impl<'self> RandomAccessIterator<bool> for BitvIterator<'self> {
/// as a `uint`.
#[deriving(Clone)]
pub struct BitvSet {
// all were already priv!!
priv size: uint,

// In theory this is a `Bitv` instead of always a `BigBitv`, but knowing that
Expand Down Expand Up @@ -903,7 +900,6 @@ impl BitvSet {
}

pub struct BitvSetIterator<'self> {
// all were already priv
priv set: &'self BitvSet,
priv next_idx: uint
}
Expand Down
1 change: 0 additions & 1 deletion src/libextra/c_vec.rs
Expand Up @@ -44,7 +44,6 @@ use std::util;
* The type representing a foreign chunk of memory
*/
pub struct CVec<T> {
/// No change all were allready priv!!
priv base: *mut T,
priv len: uint,
priv rsrc: @DtorRes,
Expand Down
2 changes: 0 additions & 2 deletions src/libextra/comm.rs
Expand Up @@ -23,7 +23,6 @@ use std::comm;

/// An extension of `pipes::stream` that allows both sending and receiving.
pub struct DuplexStream<T, U> {
// all were already priv
priv chan: Chan<T>,
priv port: Port<U>,
}
Expand Down Expand Up @@ -95,7 +94,6 @@ pub fn DuplexStream<T:Send,U:Send>()
// all were already priv
pub struct SyncChan<T> { priv duplex_stream: DuplexStream<T, ()> }
/// An extension of `pipes::stream` that acknowledges each message received.
// all were already priv
pub struct SyncPort<T> { priv duplex_stream: DuplexStream<(), T> }

impl<T: Send> GenericChan<T> for SyncChan<T> {
Expand Down
2 changes: 0 additions & 2 deletions src/libextra/crypto/cryptoutil.rs
Expand Up @@ -284,7 +284,6 @@ macro_rules! impl_fixed_buffer( ($name:ident, $size:expr) => (

/// A fixed size buffer of 64 bytes useful for cryptographic operations.
pub struct FixedBuffer64 {
// already priv
priv buffer: [u8, ..64],
priv buffer_idx: uint,
}
Expand All @@ -303,7 +302,6 @@ impl_fixed_buffer!(FixedBuffer64, 64)

/// A fixed size buffer of 128 bytes useful for cryptographic operations.
pub struct FixedBuffer128 {
// already priv
priv buffer: [u8, ..128],
priv buffer_idx: uint,
}
Expand Down
1 change: 0 additions & 1 deletion src/libextra/crypto/md5.rs
Expand Up @@ -159,7 +159,6 @@ static C4: [u32, ..16] = [

/// The MD5 Digest algorithm
pub struct Md5 {
// already priv
priv length_bytes: u64,
priv buffer: FixedBuffer64,
priv state: Md5State,
Expand Down
1 change: 0 additions & 1 deletion src/libextra/crypto/sha1.rs
Expand Up @@ -43,7 +43,6 @@ static K3: u32 = 0xCA62C1D6u32;

/// Structure representing the state of a Sha1 computation
pub struct Sha1 {
// already priv
priv h: [u32, ..DIGEST_BUF_LEN],
priv length_bits: u64,
priv buffer: FixedBuffer64,
Expand Down
6 changes: 0 additions & 6 deletions src/libextra/crypto/sha2.rs
Expand Up @@ -234,7 +234,6 @@ impl Engine512 {

/// The SHA-512 hash algorithm
pub struct Sha512 {
// already priv
priv engine: Engine512
}

Expand Down Expand Up @@ -288,7 +287,6 @@ static H512: [u64, ..8] = [

/// The SHA-384 hash algorithm
pub struct Sha384 {
// already priv
priv engine: Engine512
}

Expand Down Expand Up @@ -340,7 +338,6 @@ static H384: [u64, ..8] = [

/// The SHA-512 hash algorithm with digest truncated to 256 bits
pub struct Sha512Trunc256 {
// already priv
priv engine: Engine512
}

Expand Down Expand Up @@ -390,7 +387,6 @@ static H512_TRUNC_256: [u64, ..8] = [

/// The SHA-512 hash algorithm with digest truncated to 224 bits
pub struct Sha512Trunc224 {
// already priv
priv engine: Engine512
}

Expand Down Expand Up @@ -647,7 +643,6 @@ impl Engine256 {

/// The SHA-256 hash algorithm
pub struct Sha256 {
// already priv
priv engine: Engine256
}

Expand Down Expand Up @@ -701,7 +696,6 @@ static H256: [u32, ..8] = [

/// The SHA-224 hash algorithm
pub struct Sha224 {
// already priv
priv engine: Engine256
}

Expand Down
4 changes: 0 additions & 4 deletions src/libextra/dlist.rs
Expand Up @@ -32,7 +32,6 @@ use container::Deque;

/// A doubly-linked list.
pub struct DList<T> {
// all were already priv
priv length: uint,
priv list_head: Link<T>,
priv list_tail: Rawlink<Node<T>>,
Expand All @@ -50,15 +49,13 @@ struct Node<T> {
/// Double-ended DList iterator
#[deriving(Clone)]
pub struct DListIterator<'self, T> {
// all were already priv
priv head: &'self Link<T>,
priv tail: Rawlink<Node<T>>,
priv nelem: uint,
}

/// Double-ended mutable DList iterator
pub struct MutDListIterator<'self, T> {
// all were already priv
priv list: &'self mut DList<T>,
priv head: Rawlink<Node<T>>,
priv tail: Rawlink<Node<T>>,
Expand All @@ -68,7 +65,6 @@ pub struct MutDListIterator<'self, T> {
/// DList consuming iterator
#[deriving(Clone)]
pub struct MoveIterator<T> {
// all were already priv
priv list: DList<T>
}

Expand Down
6 changes: 0 additions & 6 deletions src/libextra/ebml.rs
Expand Up @@ -30,7 +30,6 @@ struct EbmlState {

#[deriving(Clone)]
pub struct Doc {
// all these should be public
data: @~[u8],
start: uint,
end: uint,
Expand All @@ -51,9 +50,7 @@ impl Doc {
}

pub struct TaggedDoc {
// was made privv by reedlepee
priv tag: uint,
// should be public
doc: Doc,
}

Expand Down Expand Up @@ -287,7 +284,6 @@ pub mod reader {
pub fn doc_as_i64(d: Doc) -> i64 { doc_as_u64(d) as i64 }

pub struct Decoder {
// all were already priv
priv parent: Doc,
priv pos: uint,
}
Expand Down Expand Up @@ -622,9 +618,7 @@ pub mod writer {

// ebml writing
pub struct Encoder {
/// should be public!!
writer: @io::Writer,
/// this was already privv!!
priv size_positions: ~[uint],
}

Expand Down
2 changes: 0 additions & 2 deletions src/libextra/enum_set.rs
Expand Up @@ -18,7 +18,6 @@
pub struct EnumSet<E> {
// We must maintain the invariant that no bits are set
// for which no variant exists
// all were already priv
priv bits: uint
}

Expand Down Expand Up @@ -101,7 +100,6 @@ impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {

/// An iterator over an EnumSet
pub struct EnumSetIterator<E> {
// all were already priv
priv index: uint,
priv bits: uint,
}
Expand Down
2 changes: 0 additions & 2 deletions src/libextra/fileinput.rs
Expand Up @@ -109,7 +109,6 @@ file is `stdin`.
*/
#[deriving(Clone)]
pub struct FileInputState {
// all were priv made by reedlepee
priv current_path: Option<Path>,
priv line_num: uint,
priv line_num_file: uint
Expand Down Expand Up @@ -156,7 +155,6 @@ struct FileInput_ {
// "self.fi" -> "self." and renaming FileInput_. Documentation above
// will likely have to be updated to use `let mut in = ...`.
pub struct FileInput {
/// all were made priv by reedlepee
priv fi: @mut FileInput_
}

Expand Down
1 change: 0 additions & 1 deletion src/libextra/future.rs
Expand Up @@ -32,7 +32,6 @@ use std::util::replace;

/// A type encapsulating the result of a computation which may not be complete
pub struct Future<A> {
// all were already privv!!
priv state: FutureState<A>,
}

Expand Down
3 changes: 0 additions & 3 deletions src/libextra/getopts.rs
Expand Up @@ -112,8 +112,6 @@ pub enum Occur {
/// A description of a possible option.
#[deriving(Clone, Eq)]
pub struct Opt {

/// reedlepee added priv infront of them!!
/// Name of the option
name: Name,
/// Wheter it has an argument... should be public!!
Expand All @@ -136,7 +134,6 @@ enum Optval {
#[deriving(Clone, Eq)]
pub struct Matches {

/// reedlepee added priv infront of all
/// Options that matched
priv opts: ~[Opt],
/// Values of the Options that matched
Expand Down
3 changes: 0 additions & 3 deletions src/libextra/glob.rs
Expand Up @@ -33,7 +33,6 @@ use sort;
* pattern - see the `glob` function for more details.
*/
pub struct GlobIterator {
/// no change by reedlepee all were priv already!!
priv root: Path,
priv dir_patterns: ~[Pattern],
priv options: MatchOptions,
Expand Down Expand Up @@ -157,7 +156,6 @@ fn list_dir_sorted(path: &Path) -> ~[Path] {
*/
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
pub struct Pattern {
// already priv
priv tokens: ~[PatternToken]
}

Expand Down Expand Up @@ -476,7 +474,6 @@ fn chars_eq(a: char, b: char, case_sensitive: bool) -> bool {
*/
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, IterBytes, Default)]
pub struct MatchOptions {
/// all were made priv by reedlepee

/**
* Whether or not patterns should be matched in a case-sensitive manner. This
Expand Down
1 change: 0 additions & 1 deletion src/libextra/io_util.rs
Expand Up @@ -16,7 +16,6 @@ use std::cast;

/// An implementation of the io::Reader interface which reads a buffer of bytes
pub struct BufReader {
// all were made priv by reedlepee
/// The buffer of bytes to read
priv buf: ~[u8],
/// The current position in the buffer of bytes
Expand Down
5 changes: 0 additions & 5 deletions src/libextra/json.rs
Expand Up @@ -48,7 +48,6 @@ pub type Object = TreeMap<~str, Json>;
/// If an error occurs while parsing some JSON, this is the structure which is
/// returned
pub struct Error {
// all were made privv by reedlepee
/// The line number at which the error occurred
priv line: uint,
/// The column number at which the error occurred
Expand Down Expand Up @@ -87,7 +86,6 @@ fn spaces(n: uint) -> ~str {

/// A structure for implementing serialization to JSON.
pub struct Encoder {
// all were already priv
priv wr: @io::Writer,
}

Expand Down Expand Up @@ -245,7 +243,6 @@ impl serialize::Encoder for Encoder {
/// Another encoder for JSON, but prints out human-readable JSON instead of
/// compact data
pub struct PrettyEncoder {
// all were already priv
priv wr: @io::Writer,
priv indent: uint,
}
Expand Down Expand Up @@ -482,7 +479,6 @@ impl Json{
}

pub struct Parser<T> {
// all were already priv
priv rdr: ~T,
priv ch: char,
priv line: uint,
Expand Down Expand Up @@ -872,7 +868,6 @@ pub fn from_str(s: &str) -> Result<Json, Error> {

/// A structure to decode JSON to values in rust.
pub struct Decoder {
// all were already priv
priv stack: ~[Json],
}

Expand Down

0 comments on commit ad46544

Please sign in to comment.