Skip to content

Commit 88cc3b2

Browse files
committed
---
yaml --- r: 36136 b: refs/heads/try2 c: 1afa299 h: refs/heads/master v: v3
1 parent 6cb8547 commit 88cc3b2

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9ed8ce33646e0253fda91471fe528d1800bdf70c
8+
refs/heads/try2: 1afa29986fe62cf817e886412dfb6d42b2d5f7e5
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/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/try2/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)