Skip to content

Commit 30eb9d3

Browse files
committed
Update to rust master
1 parent f2d2d39 commit 30eb9d3

File tree

14 files changed

+33
-39
lines changed

14 files changed

+33
-39
lines changed

examples/add.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;
@@ -34,21 +33,22 @@ fn run(args: &Args) -> Result<(), git2::Error> {
3433
let repo = try!(Repository::open(&Path::new(".")));
3534
let mut index = try!(repo.index());
3635

37-
let cb = if args.flag_verbose || args.flag_update {
38-
Some(|path: &[u8], _matched_spec: &[u8]| -> int {
39-
let path = Path::new(path);
40-
let status = repo.status_file(&path).unwrap();
36+
let cb = (&mut |&mut: path: &[u8], _matched_spec: &[u8]| -> int {
37+
let path = Path::new(path);
38+
let status = repo.status_file(&path).unwrap();
4139

42-
let ret = if status.contains(git2::STATUS_WT_MODIFIED) ||
43-
status.contains(git2::STATUS_WT_NEW) {
44-
println!("add '{}'", path.display());
45-
0
46-
} else {
47-
1
48-
};
40+
let ret = if status.contains(git2::STATUS_WT_MODIFIED) ||
41+
status.contains(git2::STATUS_WT_NEW) {
42+
println!("add '{}'", path.display());
43+
0
44+
} else {
45+
1
46+
};
4947

50-
if args.flag_dry_run {1} else {ret}
51-
})
48+
if args.flag_dry_run {1} else {ret}
49+
}) as &mut git2::IndexMatchedPath;
50+
let cb = if args.flag_verbose || args.flag_update {
51+
Some(cb)
5252
} else {
5353
None
5454
};

examples/clone.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;

examples/fetch.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;

examples/init.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;

examples/log.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(macro_rules, old_orphan_check)]
15+
#![feature(macro_rules)]
1616
#![deny(warnings)]
1717

1818
extern crate "rustc-serialize" as rustc_serialize;

examples/ls-remote.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;

examples/rev-list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1414
*/
1515

16-
#![feature(slicing_syntax, old_orphan_check)]
16+
#![feature(slicing_syntax)]
1717
#![deny(warnings)]
1818

1919
extern crate git2;

examples/rev-parse.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;

examples/status.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* <http://creativecommons.org/publicdomain/zero/1.0/>.
1313
*/
1414

15-
#![feature(old_orphan_check)]
1615
#![deny(warnings)]
1716

1817
extern crate git2;

src/build.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,7 @@ extern fn progress_cb(path: *const c_char,
432432
};
433433
let path = CString::new(path, false);
434434
panic::wrap(|| {
435-
callback.call_mut((path.as_bytes_no_nul(),
436-
completed as uint, total as uint));
435+
callback(path.as_bytes_no_nul(), completed as uint, total as uint);
437436
});
438437
}
439438
}

0 commit comments

Comments
 (0)