Merge pull request #685 from hexsel/depend-on-nightly-officially

Moved code officially to run on nightly since it's a dependency
This commit is contained in:
Michael Gehring 2015-08-26 21:06:04 +02:00
commit 314a254d1f
9 changed files with 7 additions and 15 deletions

View file

@ -316,11 +316,11 @@ $(BUILDDIR)/uutils: $(SRCDIR)/uutils/uutils.rs $(BUILDDIR)/mkuutils $(RLIB_PATHS
$(BUILDDIR)/mkuutils $(BUILDDIR)/gen/uutils.rs $(EXES)
$(RUSTC) $(RUSTCBINFLAGS) $(RESERVED_EXTERNS) --emit link,dep-info $(BUILDDIR)/gen/uutils.rs --out-dir $(BUILDDIR)
$(if $(ENABLE_STRIP),strip $@)
# Library for stdbuf
$(BUILDDIR)/libstdbuf.$(DYLIB_EXT): $(SRCDIR)/stdbuf/libstdbuf.rs $(SRCDIR)/stdbuf/libstdbuf.c $(SRCDIR)/stdbuf/libstdbuf.h | $(BUILDDIR)
cd $(SRCDIR)/stdbuf && \
$(RUSTC) libstdbuf.rs && \
$(RUSTC) libstdbuf.rs --extern libc=$(BUILDDIR)/liblibc.rlib && \
$(CC) -c -Wall -Werror -fPIC libstdbuf.c && \
$(CC) $(DYLIB_FLAGS) -o libstdbuf.$(DYLIB_EXT) liblibstdbuf.a libstdbuf.o && \
mv *.$(DYLIB_EXT) $(BUILDDIR) && $(RM) *.o && $(RM) *.a

View file

@ -174,8 +174,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
};
if !free.is_empty() {
// NB: Using deprecated connect() until Rust 1.3 becomes stable.
let string = free.connect(" ");
let string = free.join(" ");
if options.escape {
let mut prev_was_slash = false;
let mut iter = string.chars().enumerate();

View file

@ -153,7 +153,7 @@ fn fold_file<T: Read>(mut file: BufReader<T>, bytes: bool, spaces: bool, width:
match rfind_whitespace(slice) {
Some(m) => {
let routput = &slice[m + 1 .. slice.chars().count()];
let ncount = routput.chars().fold(0usize, |out, ch: char| {
let ncount = routput.chars().fold(0, |out, ch: char| {
out + match ch {
'\t' => 8,
'\x08' => if out > 0 { -1 } else { 0 },

View file

@ -420,9 +420,7 @@ fn adjust_tex_str(context: &str) -> String {
let ws_reg = Regex::new(r"[\t\n\v\f\r ]").unwrap();
let mut fix: String = ws_reg.replace_all(context, " ").trim().to_string();
let mapped_chunks: Vec<String> = fix.chars().map(tex_mapper).collect();
// NB: Using deprecated connect() until Rust 1.3 becomes stable.
// When 1.3 is released, replace connect() with join().
fix = mapped_chunks.connect("");
fix = mapped_chunks.join("");
fix
}

View file

@ -1,6 +1,5 @@
#![crate_name = "libstdbuf"]
#![crate_type = "staticlib"]
#![feature(libc)]
extern crate libc;

View file

@ -1,5 +1,4 @@
#![crate_name = "stdbuf"]
#![feature(negate_unsigned)]
/*
* This file is part of the uutils coreutils package.

View file

@ -1,5 +1,4 @@
#![crate_name = "timeout"]
#![feature(process_id)]
/*
* This file is part of the uutils coreutils package.

View file

@ -117,7 +117,6 @@ fn exec(filename: &str) {
if users.len() > 0 {
users.sort();
// NB: Using deprecated connect() until Rust 1.3 becomes stable.
println!("{}", users.connect(" "));
println!("{}", users.join(" "));
}
}

View file

@ -50,8 +50,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
let string = if matches.free.is_empty() {
"y".to_string()
} else {
// NB: Using deprecated connect() until Rust 1.3 becomes stable.
matches.free.connect(" ")
matches.free.join(" ")
};
exec(&string[..]);