Skip to content

Commit 8f9014c

Browse files
author
blake2-ppc
committed
std: Mark the static constants in str.rs as private
static variables are pub by default, which is not reflected in our code (we need to use priv).
1 parent aa89325 commit 8f9014c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/libstd/str.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ pub fn count_bytes<'b>(s: &'b str, start: uint, n: uint) -> uint {
726726
}
727727

728728
// https://tools.ietf.org/html/rfc3629
729-
static UTF8_CHAR_WIDTH: [u8, ..256] = [
729+
priv static UTF8_CHAR_WIDTH: [u8, ..256] = [
730730
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
731731
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F
732732
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -757,15 +757,15 @@ pub struct CharRange {
757757
}
758758

759759
// UTF-8 tags and ranges
760-
static TAG_CONT_U8: u8 = 128u8;
761-
static TAG_CONT: uint = 128u;
762-
static MAX_ONE_B: uint = 128u;
763-
static TAG_TWO_B: uint = 192u;
764-
static MAX_TWO_B: uint = 2048u;
765-
static TAG_THREE_B: uint = 224u;
766-
static MAX_THREE_B: uint = 65536u;
767-
static TAG_FOUR_B: uint = 240u;
768-
static MAX_UNICODE: uint = 1114112u;
760+
priv static TAG_CONT_U8: u8 = 128u8;
761+
priv static TAG_CONT: uint = 128u;
762+
priv static MAX_ONE_B: uint = 128u;
763+
priv static TAG_TWO_B: uint = 192u;
764+
priv static MAX_TWO_B: uint = 2048u;
765+
priv static TAG_THREE_B: uint = 224u;
766+
priv static MAX_THREE_B: uint = 65536u;
767+
priv static TAG_FOUR_B: uint = 240u;
768+
priv static MAX_UNICODE: uint = 1114112u;
769769

770770
/// Unsafe operations
771771
pub mod raw {

0 commit comments

Comments
 (0)