about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-08-06 23:03:31 -0700
committerCorey Richardson <corey@octayn.net>2013-08-07 22:41:12 -0400
commite99eff172a11816f335153147dd0800fc4877bee (patch)
tree5579273b59f513437a40cd0f47205b49df434559 /src/libextra
parent8964fcc5ac9cefcc55ea071142c3c81d623a52be (diff)
downloadrust-e99eff172a11816f335153147dd0800fc4877bee.tar.gz
rust-e99eff172a11816f335153147dd0800fc4877bee.zip
Forbid `priv` where it has no effect
This is everywhere except struct fields and enum variants.
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/fileinput.rs14
-rw-r--r--src/libextra/future.rs2
-rw-r--r--src/libextra/getopts.rs8
-rw-r--r--src/libextra/num/bigint.rs20
-rw-r--r--src/libextra/stats.rs2
-rw-r--r--src/libextra/term.rs4
-rw-r--r--src/libextra/terminfo/parm.rs12
-rw-r--r--src/libextra/time.rs4
8 files changed, 33 insertions, 33 deletions
diff --git a/src/libextra/fileinput.rs b/src/libextra/fileinput.rs
index 7a36b25eac5..14b02688cff 100644
--- a/src/libextra/fileinput.rs
+++ b/src/libextra/fileinput.rs
@@ -129,27 +129,27 @@ struct FileInput_ {
     `Some(path)` is the file represented by `path`, `None` is
     `stdin`. Consumed as the files are read.
     */
-    priv files: ~[Option<Path>],
+    files: ~[Option<Path>],
     /**
     The current file: `Some(r)` for an open file, `None` before
     starting and after reading everything.
     */
-    priv current_reader: Option<@io::Reader>,
-    priv state: FileInputState,
+    current_reader: Option<@io::Reader>,
+    state: FileInputState,
 
     /**
     Used to keep track of whether we need to insert the newline at the
     end of a file that is missing it, which is needed to separate the
     last and first lines.
     */
-    priv previous_was_newline: bool
+    previous_was_newline: bool
 }
 
 // XXX: remove this when Reader has &mut self. Should be removable via
 // "self.fi." -> "self." and renaming FileInput_. Documentation above
 // will likely have to be updated to use `let mut in = ...`.
 pub struct FileInput  {
-    priv fi: @mut FileInput_
+    fi: @mut FileInput_
 }
 
 impl FileInput {
@@ -198,7 +198,7 @@ impl FileInput {
         FileInput::from_vec(pathed)
     }
 
-    priv fn current_file_eof(&self) -> bool {
+    fn current_file_eof(&self) -> bool {
         match self.fi.current_reader {
             None => false,
             Some(r) => r.eof()
@@ -240,7 +240,7 @@ impl FileInput {
     Returns `true` if it had to move to the next file and did
     so successfully.
     */
-    priv fn next_file_if_eof(&self) -> bool {
+    fn next_file_if_eof(&self) -> bool {
         match self.fi.current_reader {
             None => self.next_file(),
             Some(r) => {
diff --git a/src/libextra/future.rs b/src/libextra/future.rs
index 7d2a0658969..cc65c49d73a 100644
--- a/src/libextra/future.rs
+++ b/src/libextra/future.rs
@@ -46,7 +46,7 @@ impl<A> Drop for Future<A> {
     fn drop(&self) {}
 }
 
-priv enum FutureState<A> {
+enum FutureState<A> {
     Pending(~fn() -> A),
     Evaluating,
     Forced(A)
diff --git a/src/libextra/getopts.rs b/src/libextra/getopts.rs
index 15aac8ef47c..8bd9d857d69 100644
--- a/src/libextra/getopts.rs
+++ b/src/libextra/getopts.rs
@@ -708,9 +708,9 @@ pub mod groups {
      *  Fails during iteration if the string contains a non-whitespace
      *  sequence longer than the limit.
      */
-    priv fn each_split_within<'a>(ss: &'a str,
-                                lim: uint,
-                                it: &fn(&'a str) -> bool) -> bool {
+    fn each_split_within<'a>(ss: &'a str,
+                             lim: uint,
+                             it: &fn(&'a str) -> bool) -> bool {
         // Just for fun, let's write this as an state machine:
 
         enum SplitWithinState {
@@ -778,7 +778,7 @@ pub mod groups {
     }
 
     #[test]
-    priv fn test_split_within() {
+    fn test_split_within() {
         fn t(s: &str, i: uint, u: &[~str]) {
             let mut v = ~[];
             do each_split_within(s, i) |s| { v.push(s.to_owned()); true };
diff --git a/src/libextra/num/bigint.rs b/src/libextra/num/bigint.rs
index c3737d44e38..0c8701bd0b5 100644
--- a/src/libextra/num/bigint.rs
+++ b/src/libextra/num/bigint.rs
@@ -59,13 +59,13 @@ pub mod BigDigit {
     pub static bits: uint = 32;
 
     pub static base: uint = 1 << bits;
-    priv static hi_mask: uint = (-1 as uint) << bits;
-    priv static lo_mask: uint = (-1 as uint) >> bits;
+    static hi_mask: uint = (-1 as uint) << bits;
+    static lo_mask: uint = (-1 as uint) >> bits;
 
 
-    priv fn get_hi(n: uint) -> BigDigit { (n >> bits) as BigDigit }
+    fn get_hi(n: uint) -> BigDigit { (n >> bits) as BigDigit }
 
-    priv fn get_lo(n: uint) -> BigDigit { (n & lo_mask) as BigDigit }
+    fn get_lo(n: uint) -> BigDigit { (n & lo_mask) as BigDigit }
 
     /// Split one machine sized unsigned integer into two BigDigits.
 
@@ -613,7 +613,7 @@ impl BigUint {
     }
 
 
-    priv fn shl_unit(&self, n_unit: uint) -> BigUint {
+    fn shl_unit(&self, n_unit: uint) -> BigUint {
         if n_unit == 0 || self.is_zero() { return (*self).clone(); }
 
         return BigUint::new(vec::from_elem(n_unit, ZERO_BIG_DIGIT)
@@ -621,7 +621,7 @@ impl BigUint {
     }
 
 
-    priv fn shl_bits(&self, n_bits: uint) -> BigUint {
+    fn shl_bits(&self, n_bits: uint) -> BigUint {
         if n_bits == 0 || self.is_zero() { return (*self).clone(); }
 
         let mut carry = 0;
@@ -637,7 +637,7 @@ impl BigUint {
     }
 
 
-    priv fn shr_unit(&self, n_unit: uint) -> BigUint {
+    fn shr_unit(&self, n_unit: uint) -> BigUint {
         if n_unit == 0 { return (*self).clone(); }
         if self.data.len() < n_unit { return Zero::zero(); }
         return BigUint::from_slice(
@@ -646,7 +646,7 @@ impl BigUint {
     }
 
 
-    priv fn shr_bits(&self, n_bits: uint) -> BigUint {
+    fn shr_bits(&self, n_bits: uint) -> BigUint {
         if n_bits == 0 || self.data.is_empty() { return (*self).clone(); }
 
         let mut borrow = 0;
@@ -661,7 +661,7 @@ impl BigUint {
 
 #[cfg(target_arch = "x86_64")]
 
-priv fn get_radix_base(radix: uint) -> (uint, uint) {
+fn get_radix_base(radix: uint) -> (uint, uint) {
     assert!(1 < radix && radix <= 16);
     match radix {
         2  => (4294967296, 32),
@@ -687,7 +687,7 @@ priv fn get_radix_base(radix: uint) -> (uint, uint) {
 #[cfg(target_arch = "x86")]
 #[cfg(target_arch = "mips")]
 
-priv fn get_radix_base(radix: uint) -> (uint, uint) {
+fn get_radix_base(radix: uint) -> (uint, uint) {
     assert!(1 < radix && radix <= 16);
     match radix {
         2  => (65536, 16),
diff --git a/src/libextra/stats.rs b/src/libextra/stats.rs
index 9238034cba3..881d931fe0a 100644
--- a/src/libextra/stats.rs
+++ b/src/libextra/stats.rs
@@ -223,7 +223,7 @@ impl<'self> Stats for &'self [f64] {
 
 // Helper function: extract a value representing the `pct` percentile of a sorted sample-set, using
 // linear interpolation. If samples are not sorted, return nonsensical value.
-priv fn percentile_of_sorted(sorted_samples: &[f64],
+fn percentile_of_sorted(sorted_samples: &[f64],
                              pct: f64) -> f64 {
     assert!(sorted_samples.len() != 0);
     if sorted_samples.len() == 1 {
diff --git a/src/libextra/term.rs b/src/libextra/term.rs
index 2173eb838e5..d0412b8954d 100644
--- a/src/libextra/term.rs
+++ b/src/libextra/term.rs
@@ -75,7 +75,7 @@ pub mod attr {
 }
 
 #[cfg(not(target_os = "win32"))]
-priv fn cap_for_attr(attr: attr::Attr) -> &'static str {
+fn cap_for_attr(attr: attr::Attr) -> &'static str {
     match attr {
         attr::Bold               => "bold",
         attr::Dim                => "dim",
@@ -234,7 +234,7 @@ impl Terminal {
         }
     }
 
-    priv fn dim_if_necessary(&self, color: color::Color) -> color::Color {
+    fn dim_if_necessary(&self, color: color::Color) -> color::Color {
         if color >= self.num_colors && color >= 8 && color < 16 {
             color-8
         } else { color }
diff --git a/src/libextra/terminfo/parm.rs b/src/libextra/terminfo/parm.rs
index b619e0f33b6..0929575ee9e 100644
--- a/src/libextra/terminfo/parm.rs
+++ b/src/libextra/terminfo/parm.rs
@@ -430,7 +430,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
 }
 
 #[deriving(Eq)]
-priv struct Flags {
+struct Flags {
     width: uint,
     precision: uint,
     alternate: bool,
@@ -440,13 +440,13 @@ priv struct Flags {
 }
 
 impl Flags {
-    priv fn new() -> Flags {
+    fn new() -> Flags {
         Flags{ width: 0, precision: 0, alternate: false,
                left: false, sign: false, space: false }
     }
 }
 
-priv enum FormatOp {
+enum FormatOp {
     FormatDigit,
     FormatOctal,
     FormatHex,
@@ -455,7 +455,7 @@ priv enum FormatOp {
 }
 
 impl FormatOp {
-    priv fn from_char(c: char) -> FormatOp {
+    fn from_char(c: char) -> FormatOp {
         match c {
             'd' => FormatDigit,
             'o' => FormatOctal,
@@ -465,7 +465,7 @@ impl FormatOp {
             _ => fail!("bad FormatOp char")
         }
     }
-    priv fn to_char(self) -> char {
+    fn to_char(self) -> char {
         match self {
             FormatDigit => 'd',
             FormatOctal => 'o',
@@ -476,7 +476,7 @@ impl FormatOp {
     }
 }
 
-priv fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> {
+fn format(val: Param, op: FormatOp, flags: Flags) -> Result<~[u8],~str> {
     let mut s = match val {
         Number(d) => {
             match op {
diff --git a/src/libextra/time.rs b/src/libextra/time.rs
index efc3dc87adc..f6a5fd98234 100644
--- a/src/libextra/time.rs
+++ b/src/libextra/time.rs
@@ -254,7 +254,7 @@ impl Tm {
     }
 }
 
-priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
+fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
     fn match_str(s: &str, pos: uint, needle: &str) -> bool {
         let mut i = pos;
         for ch in needle.byte_iter() {
@@ -687,7 +687,7 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
     }
 }
 
-priv fn do_strftime(format: &str, tm: &Tm) -> ~str {
+fn do_strftime(format: &str, tm: &Tm) -> ~str {
     fn parse_type(ch: char, tm: &Tm) -> ~str {
         //FIXME (#2350): Implement missing types.
       let die = || fmt!("strftime: can't understand this format %c ", ch);