Skip to content

Commit 800ea58

Browse files
committed
---
yaml --- r: 7147 b: refs/heads/master c: f6ecbe8 h: refs/heads/master i: 7145: 83b6bb5 7143: 9cf64e3 v: v3
1 parent e5f8e5e commit 800ea58

File tree

4 files changed

+15
-26
lines changed

4 files changed

+15
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: ae76a7db5d5747aad7e572911848800e139f127b
2+
refs/heads/master: f6ecbe88ca67769ccb9def337ada9ae25235e00e

trunk/src/comp/back/rpath.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ mod test {
218218
#[test]
219219
fn test_prefix_rpath() {
220220
let res = get_install_prefix_rpath("/usr/lib", "triple");
221-
assert str::ends_with(res, #env("CFG_PREFIX")
222-
+ "/lib/rustc/triple/lib");
221+
let d = fs::connect(#env("CFG_PREFIX"), "/lib/rustc/triple/lib");
222+
assert str::ends_with(res, d);
223223
}
224224

225225
#[test]

trunk/src/libcore/ctypes.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ A signed integer with the same size as a C `long`
3232
*/
3333
type long = int;
3434

35-
/*
36-
Type: longlong
37-
38-
A signed integer with the same size as a C `long long`
39-
*/
40-
type longlong = i64;
41-
4235
/*
4336
Type: unsigned
4437

@@ -53,13 +46,6 @@ An unsigned integer with the same size as a C `unsigned long`
5346
*/
5447
type ulong = uint;
5548

56-
/*
57-
Type: ulonglong
58-
59-
An unsigned integer with the same size as a C `unsigned long long`
60-
*/
61-
type ulonglong = u64;
62-
6349
/*
6450
Type: intptr_t
6551

trunk/src/libstd/fs.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,20 @@ Function: connect
8181
8282
Connects to path segments
8383
84-
Given paths `pre` and `post` this function will return a path
85-
that is equal to `post` appended to `pre`, inserting a path separator
86-
between the two as needed.
84+
Given paths `pre` and `post, removes any trailing path separator on `pre` and
85+
any leading path separator on `post`, and returns the concatenation of the two
86+
with a single path separator between them.
8787
*/
88-
fn connect(pre: path, post: path) -> path {
89-
let len = str::byte_len(pre);
90-
ret if pre[len - 1u] == os_fs::path_sep as u8 {
9188

92-
// Trailing '/'?
93-
pre + post
94-
} else { pre + path_sep() + post };
89+
fn connect(pre: path, post: path) -> path {
90+
let pre_ = pre;
91+
let post_ = post;
92+
let sep = os_fs::path_sep as u8;
93+
let pre_len = str::byte_len(pre);
94+
let post_len = str::byte_len(post);
95+
if pre_len > 1u && pre[pre_len-1u] == sep { str::pop_byte(pre_); }
96+
if post_len > 1u && post[0] == sep { str::shift_byte(post_); }
97+
ret pre_ + path_sep() + post_;
9598
}
9699

97100
/*

0 commit comments

Comments
 (0)