Skip to content

Commit f861a3d

Browse files
committed
---
yaml --- r: 40231 b: refs/heads/dist-snap c: 1afa299 h: refs/heads/master i: 40229: b868da4 40227: d45915e 40223: 8f5e8de v: v3
1 parent ceee3c7 commit f861a3d

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278
99
refs/heads/incoming: e90142e536c150df0d9b4b2f11352152177509b5
10-
refs/heads/dist-snap: 9ed8ce33646e0253fda91471fe528d1800bdf70c
10+
refs/heads/dist-snap: 1afa29986fe62cf817e886412dfb6d42b2d5f7e5
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/rl.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,43 +17,43 @@ extern mod linenoise {
1717

1818
/// Add a line to history
1919
pub fn add_history(line: ~str) -> bool {
20-
do str::as_c_str(line) |buf| {
21-
linenoise::linenoiseHistoryAdd(buf) == 1 as c_int
22-
}
20+
do str::as_c_str(line) |buf| {
21+
linenoise::linenoiseHistoryAdd(buf) == 1 as c_int
22+
}
2323
}
2424

2525
/// Set the maximum amount of lines stored
2626
pub fn set_history_max_len(len: int) -> bool {
27-
linenoise::linenoiseHistorySetMaxLen(len as c_int) == 1 as c_int
27+
linenoise::linenoiseHistorySetMaxLen(len as c_int) == 1 as c_int
2828
}
2929

3030
/// Save line history to a file
3131
pub fn save_history(file: ~str) -> bool {
32-
do str::as_c_str(file) |buf| {
33-
linenoise::linenoiseHistorySave(buf) == 1 as c_int
34-
}
32+
do str::as_c_str(file) |buf| {
33+
linenoise::linenoiseHistorySave(buf) == 1 as c_int
34+
}
3535
}
3636

3737
/// Load line history from a file
3838
pub fn load_history(file: ~str) -> bool {
39-
do str::as_c_str(file) |buf| {
40-
linenoise::linenoiseHistoryLoad(buf) == 1 as c_int
41-
}
39+
do str::as_c_str(file) |buf| {
40+
linenoise::linenoiseHistoryLoad(buf) == 1 as c_int
41+
}
4242
}
4343

4444
/// Print out a prompt and then wait for input and return it
4545
pub fn read(prompt: ~str) -> Option<~str> {
46-
do str::as_c_str(prompt) |buf| unsafe {
47-
let line = linenoise::linenoise(buf);
46+
do str::as_c_str(prompt) |buf| unsafe {
47+
let line = linenoise::linenoise(buf);
4848

49-
if line.is_null() { None }
50-
else { Some(str::raw::from_c_str(line)) }
51-
}
49+
if line.is_null() { None }
50+
else { Some(str::raw::from_c_str(line)) }
51+
}
5252
}
5353

5454
/// Clear the screen
5555
pub fn clear() {
56-
linenoise::linenoiseClearScreen();
56+
linenoise::linenoiseClearScreen();
5757
}
5858

5959
pub type CompletionCb = fn~(~str, fn(~str));
@@ -62,17 +62,17 @@ fn complete_key(_v: @CompletionCb) {}
6262

6363
/// Bind to the main completion callback
6464
pub fn complete(cb: CompletionCb) unsafe {
65-
task::local_data::local_data_set(complete_key, @(move cb));
65+
task::local_data::local_data_set(complete_key, @(move cb));
6666

67-
extern fn callback(line: *c_char, completions: *()) unsafe {
68-
let cb: CompletionCb = copy *task::local_data::local_data_get(complete_key).get();
67+
extern fn callback(line: *c_char, completions: *()) unsafe {
68+
let cb = copy *task::local_data::local_data_get(complete_key).get();
6969

70-
do cb(str::raw::from_c_str(line)) |suggestion| {
71-
do str::as_c_str(suggestion) |buf| {
72-
linenoise::linenoiseAddCompletion(completions, buf);
73-
}
74-
}
75-
}
70+
do cb(str::raw::from_c_str(line)) |suggestion| {
71+
do str::as_c_str(suggestion) |buf| {
72+
linenoise::linenoiseAddCompletion(completions, buf);
73+
}
74+
}
75+
}
7676

77-
linenoise::linenoiseSetCompletionCallback(callback);
77+
linenoise::linenoiseSetCompletionCallback(callback);
7878
}

branches/dist-snap/src/rusti/rusti.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ fn run_cmd(repl: &mut Repl, _in: io::Reader, _out: io::Writer,
246246
rl::clear();
247247
}
248248
~"help" => {
249-
io::println(~":clear - clear the screen\n" +
249+
io::println(~":clear - clear the screen\n" +
250250
~":exit - exit from the repl\n" +
251251
~":help - show this message");
252252
}
@@ -294,7 +294,7 @@ fn main() {
294294
if line.starts_with(~":") {
295295
let full = line.substr(1, line.len() - 1);
296296
let split = full.split_char(' ');
297-
let len = split.len();
297+
let len = split.len();
298298

299299
if len > 0 {
300300
let cmd = split[0];

0 commit comments

Comments
 (0)