Forbid priv where it has no effect
This is everywhere except struct fields and enum variants.
This commit is contained in:
parent
8964fcc5ac
commit
e99eff172a
17 changed files with 81 additions and 64 deletions
|
|
@ -314,7 +314,7 @@ mod pipesy {
|
|||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub mod oneshot {
|
||||
priv use std::kinds::Send;
|
||||
use std::kinds::Send;
|
||||
use ptr::to_mut_unsafe_ptr;
|
||||
|
||||
pub fn init<T: Send>() -> (server::Oneshot<T>, client::Oneshot<T>) {
|
||||
|
|
@ -341,7 +341,7 @@ mod pipesy {
|
|||
#[allow(non_camel_case_types)]
|
||||
pub mod client {
|
||||
|
||||
priv use std::kinds::Send;
|
||||
use std::kinds::Send;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub fn try_send<T: Send>(pipe: Oneshot<T>, x_0: T) ->
|
||||
|
|
@ -489,7 +489,7 @@ mod pipesy {
|
|||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub mod streamp {
|
||||
priv use std::kinds::Send;
|
||||
use std::kinds::Send;
|
||||
|
||||
pub fn init<T: Send>() -> (server::Open<T>, client::Open<T>) {
|
||||
pub use std::pipes::HasBuffer;
|
||||
|
|
@ -501,7 +501,7 @@ mod pipesy {
|
|||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub mod client {
|
||||
priv use std::kinds::Send;
|
||||
use std::kinds::Send;
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
pub fn try_data<T: Send>(pipe: Open<T>, x_0: T) ->
|
||||
|
|
|
|||
|
|
@ -422,9 +422,9 @@ pub fn float_to_str_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Float+Round+
|
|||
|
||||
// Some constants for from_str_bytes_common's input validation,
|
||||
// they define minimum radix values for which the character is a valid digit.
|
||||
priv static DIGIT_P_RADIX: uint = ('p' as uint) - ('a' as uint) + 11u;
|
||||
priv static DIGIT_I_RADIX: uint = ('i' as uint) - ('a' as uint) + 11u;
|
||||
priv static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u;
|
||||
static DIGIT_P_RADIX: uint = ('p' as uint) - ('a' as uint) + 11u;
|
||||
static DIGIT_I_RADIX: uint = ('i' as uint) - ('a' as uint) + 11u;
|
||||
static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u;
|
||||
|
||||
/**
|
||||
* Parses a byte slice as a number. This is meant to
|
||||
|
|
|
|||
|
|
@ -761,14 +761,14 @@ fn with_dirp<T>(d: Option<&Path>,
|
|||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
priv fn free_handle(handle: *()) {
|
||||
fn free_handle(handle: *()) {
|
||||
unsafe {
|
||||
libc::funcs::extra::kernel32::CloseHandle(cast::transmute(handle));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
priv fn free_handle(_handle: *()) {
|
||||
fn free_handle(_handle: *()) {
|
||||
// unix has no process handle object, just a pid
|
||||
}
|
||||
|
||||
|
|
@ -823,7 +823,7 @@ pub fn process_output(prog: &str, args: &[~str]) -> ProcessOutput {
|
|||
* operate on a none-existant process or, even worse, on a newer process
|
||||
* with the same id.
|
||||
*/
|
||||
priv fn waitpid(pid: pid_t) -> int {
|
||||
fn waitpid(pid: pid_t) -> int {
|
||||
return waitpid_os(pid);
|
||||
|
||||
#[cfg(windows)]
|
||||
|
|
|
|||
|
|
@ -738,7 +738,7 @@ pub fn count_bytes<'b>(s: &'b str, start: uint, n: uint) -> uint {
|
|||
}
|
||||
|
||||
// https://tools.ietf.org/html/rfc3629
|
||||
priv static UTF8_CHAR_WIDTH: [u8, ..256] = [
|
||||
static UTF8_CHAR_WIDTH: [u8, ..256] = [
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F
|
||||
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
||||
|
|
@ -781,15 +781,15 @@ macro_rules! utf8_acc_cont_byte(
|
|||
)
|
||||
|
||||
// UTF-8 tags and ranges
|
||||
priv static TAG_CONT_U8: u8 = 128u8;
|
||||
priv static TAG_CONT: uint = 128u;
|
||||
priv static MAX_ONE_B: uint = 128u;
|
||||
priv static TAG_TWO_B: uint = 192u;
|
||||
priv static MAX_TWO_B: uint = 2048u;
|
||||
priv static TAG_THREE_B: uint = 224u;
|
||||
priv static MAX_THREE_B: uint = 65536u;
|
||||
priv static TAG_FOUR_B: uint = 240u;
|
||||
priv static MAX_UNICODE: uint = 1114112u;
|
||||
static TAG_CONT_U8: u8 = 128u8;
|
||||
static TAG_CONT: uint = 128u;
|
||||
static MAX_ONE_B: uint = 128u;
|
||||
static TAG_TWO_B: uint = 192u;
|
||||
static MAX_TWO_B: uint = 2048u;
|
||||
static TAG_THREE_B: uint = 224u;
|
||||
static MAX_THREE_B: uint = 65536u;
|
||||
static TAG_FOUR_B: uint = 240u;
|
||||
static MAX_UNICODE: uint = 1114112u;
|
||||
|
||||
/// Unsafe operations
|
||||
pub mod raw {
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ pub fn to_ascii_lower(string: &str) -> ~str {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
priv fn map_bytes(string: &str, map: &'static [u8]) -> ~str {
|
||||
fn map_bytes(string: &str, map: &'static [u8]) -> ~str {
|
||||
let len = string.len();
|
||||
let mut result = str::with_capacity(len);
|
||||
unsafe {
|
||||
|
|
@ -298,7 +298,7 @@ pub fn eq_ignore_ascii_case(a: &str, b: &str) -> bool {
|
|||
|(byte_a, byte_b)| ASCII_LOWER_MAP[*byte_a] == ASCII_LOWER_MAP[*byte_b])
|
||||
}
|
||||
|
||||
priv static ASCII_LOWER_MAP: &'static [u8] = &[
|
||||
static ASCII_LOWER_MAP: &'static [u8] = &[
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
|
|
@ -333,7 +333,7 @@ priv static ASCII_LOWER_MAP: &'static [u8] = &[
|
|||
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
|
||||
];
|
||||
|
||||
priv static ASCII_UPPER_MAP: &'static [u8] = &[
|
||||
static ASCII_UPPER_MAP: &'static [u8] = &[
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
|
||||
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
||||
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue