File tree Expand file tree Collapse file tree 6 files changed +31
-31
lines changed Expand file tree Collapse file tree 6 files changed +31
-31
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 6b22640a1f0faa109a255c268858d874587698d5
2
+ refs/heads/master: b714150487253d85f1a3cfa2e34818ed0647ac91
Original file line number Diff line number Diff line change @@ -3,25 +3,25 @@ import rustrt::sbuf;
3
3
import uint:: le;
4
4
export sbuf;
5
5
// export rustrt;
6
- export eq;
7
- export lteq;
6
+ // export eq;
7
+ // export lteq;
8
8
// export hash;
9
9
// export is_utf8;
10
10
// export is_ascii;
11
11
export alloc;
12
- export byte_len;
12
+ // export byte_len;
13
13
export buf;
14
14
// export bytes;
15
15
// export unsafe_from_byte;
16
16
// export str_from_cstr;
17
17
// export str_from_buf;
18
18
// export push_utf8_bytes;
19
- export from_char;
19
+ // export from_char;
20
20
// export from_chars;
21
21
// export utf8_char_width;
22
22
// export char_range_at;
23
- export char_at;
24
- export char_len;
23
+ // export char_at;
24
+ // export char_len;
25
25
// export to_chars;
26
26
// export push_char;
27
27
// export pop_char;
@@ -30,10 +30,10 @@ export char_len;
30
30
// export refcount;
31
31
// export index;
32
32
// export rindex;
33
- export find;
33
+ // export find;
34
34
// export starts_with;
35
35
// export ends_with;
36
- export substr;
36
+ // export substr;
37
37
// export slice;
38
38
// export shift_byte;
39
39
// export pop_byte;
@@ -42,7 +42,7 @@ export substr;
42
42
// export split;
43
43
// export concat;
44
44
// export connect;
45
- export to_upper;
45
+ // export to_upper;
46
46
// export safe_slice;
47
47
export unsafe_from_bytes;
48
48
// export is_empty;
Original file line number Diff line number Diff line change 6
6
7
7
use std;
8
8
9
- import std:: str ;
9
+ import std:: istr ;
10
10
import std:: comm;
11
11
import std:: task;
12
12
13
13
type ctx = comm:: chan < int > ;
14
14
15
- fn iotask ( cx : ctx , ip : str ) { assert ( str :: eq ( ip, "localhost" ) ) ; }
15
+ fn iotask ( cx : ctx , ip : - istr ) { assert ( istr :: eq ( ip, ~ "localhost") ) ; }
16
16
17
17
fn main ( ) {
18
18
let p = comm:: port :: < int > ( ) ;
19
- task:: spawn ( bind iotask ( comm:: chan ( p) , "localhost" ) ) ;
19
+ task:: spawn ( bind iotask ( comm:: chan ( p) , ~ "localhost") ) ;
20
20
}
Original file line number Diff line number Diff line change 2
2
3
3
// -*- rust -*-
4
4
use std;
5
- import std:: str ;
5
+ import std:: istr ;
6
6
7
7
fn test1 ( ) {
8
- let s: str = "hello" ;
9
- s += "world" ;
8
+ let s: istr = ~ "hello";
9
+ s += ~ "world";
10
10
log s;
11
11
assert ( s[ 9 ] == 'd' as u8 ) ;
12
12
}
13
13
14
14
fn test2 ( ) {
15
15
// This tests for issue #163
16
16
17
- let ff: str = "abc" ;
18
- let a: str = ff + "ABC" + ff;
19
- let b: str = "ABC" + ff + "ABC" ;
17
+ let ff: istr = ~ "abc";
18
+ let a: istr = ff + ~ "ABC " + ff;
19
+ let b: istr = ~ "ABC " + ff + ~ "ABC ";
20
20
log a;
21
21
log b;
22
- assert ( str :: eq ( a, "abcABCabc" ) ) ;
23
- assert ( str :: eq ( b, "ABCabcABC" ) ) ;
22
+ assert ( istr :: eq ( a, ~ "abcABCabc") ) ;
23
+ assert ( istr :: eq ( b, ~ "ABCabcABC ") ) ;
24
24
}
25
25
26
26
fn main ( ) { test1 ( ) ; test2 ( ) ; }
Original file line number Diff line number Diff line change 2
2
3
3
// -*- rust -*-
4
4
use std;
5
- import std:: str ;
5
+ import std:: istr ;
6
6
7
7
fn main ( ) {
8
- let a: str = "this \
8
+ let a: istr = ~ "this \
9
9
is a test";
10
- let b: str =
11
- "this \
10
+ let b: istr =
11
+ ~ "this \
12
12
is \
13
13
another \
14
14
test";
15
- assert ( str :: eq ( a, "this is a test" ) ) ;
16
- assert ( str :: eq ( b, "this is another test" ) ) ;
15
+ assert ( istr :: eq ( a, ~ "this is a test") ) ;
16
+ assert ( istr :: eq ( b, ~ "this is another test") ) ;
17
17
}
Original file line number Diff line number Diff line change 1
1
use std;
2
- import std:: str ;
2
+ import std:: istr ;
3
3
4
4
fn main ( ) {
5
5
// Make sure we properly handle repeated self-appends.
6
- let a: str = "A" ;
6
+ let a: istr = ~ "A ";
7
7
let i = 20 ;
8
8
let expected_len = 1 u;
9
9
while i > 0 {
10
- log_err str :: byte_len ( a) ;
11
- assert ( str :: byte_len ( a) == expected_len) ;
10
+ log_err istr :: byte_len ( a) ;
11
+ assert ( istr :: byte_len ( a) == expected_len) ;
12
12
a += a;
13
13
i -= 1 ;
14
14
expected_len *= 2 u;
You can’t perform that action at this time.
0 commit comments