Skip to content

Commit ce650e6

Browse files
committed
---
yaml --- r: 85951 b: refs/heads/dist-snap c: 20def31 h: refs/heads/master i: 85949: c4e36be 85947: f34dd8d 85943: 979d1d5 85935: 1756b92 85919: 633d71f 85887: f00e975 v: v3
1 parent 03ec28a commit ce650e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+1213
-1298
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 6409f6bcf1b26c2b4bf810af1e3b797d387361e8
9+
refs/heads/dist-snap: 20def317685b39a35416397b35940a4d040bf72f
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
branch = master
55
[submodule "src/libuv"]
66
path = src/libuv
7-
url = https://github.com/alexcrichton/libuv.git
7+
url = https://github.com/brson/libuv.git
88
branch = master

branches/dist-snap/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ifeq ($(CFG_LLVM_ROOT),)
2626

2727
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
2828
@$$(call E, make: llvm)
29-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1))
29+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
3030
$$(Q)touch $$(LLVM_CONFIG_$(1))
3131
endif
3232

branches/dist-snap/mk/platform.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ endef
2626
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_OSTYPE_VAR,$(t))))
2727
$(foreach t,$(CFG_TARGET_TRIPLES),$(info cfg: os for $(t) is $(OSTYPE_$(t))))
2828

29-
CFG_GCCISH_CFLAGS += -DUSE_UTF8
29+
# FIXME: no-omit-frame-pointer is just so that task_start_wrapper
30+
# has a frame pointer and the stack walker can understand it. Turning off
31+
# frame pointers everywhere is overkill
32+
CFG_GCCISH_CFLAGS += -fno-omit-frame-pointer -DUSE_UTF8
3033

3134
# On Darwin, we need to run dsymutil so the debugging information ends
3235
# up in the right place. On other platforms, it automatically gets
@@ -150,6 +153,7 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-no-whole-archive
150153
CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
151154
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
152155
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-linux-gnu =
156+
CFG_LLVM_BUILD_ENV_x86_64-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
153157
CFG_EXE_SUFFIX_x86_64-unknown-linux-gnu =
154158
CFG_WINDOWSY_x86_64-unknown-linux-gnu :=
155159
CFG_UNIXY_x86_64-unknown-linux-gnu := 1
@@ -175,6 +179,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-unknown-linux-gnu := -Wl,-no-whole-archive
175179
CFG_DEF_SUFFIX_i686-unknown-linux-gnu := .linux.def
176180
CFG_INSTALL_NAME_i686-unknown-linux-gnu =
177181
CFG_LIBUV_LINK_FLAGS_i686-unknown-linux-gnu =
182+
CFG_LLVM_BUILD_ENV_i686-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
178183
CFG_EXE_SUFFIX_i686-unknown-linux-gnu =
179184
CFG_WINDOWSY_i686-unknown-linux-gnu :=
180185
CFG_UNIXY_i686-unknown-linux-gnu := 1

branches/dist-snap/mk/rt.mk

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -168,49 +168,36 @@ LIBUV_DEPS := $$(wildcard \
168168
$$(S)src/libuv/*/*/*/*)
169169
endif
170170

171-
LIBUV_GYP := $$(S)src/libuv/build/gyp
172-
LIBUV_MAKEFILE_$(1)_$(2) := $$(CFG_BUILD_DIR)rt/$(1)/stage$(2)/libuv/Makefile
173-
LIBUV_NO_LOAD = run-benchmarks.target.mk run-tests.target.mk \
174-
uv_dtrace_header.target.mk uv_dtrace_provider.target.mk
175-
176-
$$(LIBUV_MAKEFILE_$(1)_$(2)): $$(LIBUV_GYP)
177-
(cd $(S)src/libuv/ && \
178-
$$(CFG_PYTHON) ./gyp_uv -f make -Dtarget_arch=$$(LIBUV_ARCH_$(1)) -D ninja \
179-
-Goutput_dir=$$(@D) --generator-output $$(@D))
180-
181171
# XXX: Shouldn't need platform-specific conditions here
182172
ifdef CFG_WINDOWSY_$(1)
183173
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
184-
$$(Q)rm -f $$(S)src/libuv/libuv.a
185-
$$(Q)$$(MAKE) -C $$(S)src/libuv -f Makefile.mingw \
186-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
187-
AR="$$(AR_$(1))" \
174+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
175+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
176+
OS=mingw \
188177
V=$$(VERBOSE)
189-
$$(Q)cp $$(S)src/libuv/libuv.a $$@
190178
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
191-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
192-
$$(Q)$$(MAKE) -C $$(@D) \
179+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
180+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
193181
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
194182
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
195183
CC="$$(CC_$(1))" \
196184
CXX="$$(CXX_$(1))" \
185+
LINK="$$(CXX_$(1))" \
197186
AR="$$(AR_$(1))" \
198-
host=android OS=linux \
199-
builddir="." \
187+
PLATFORM=android \
200188
BUILDTYPE=Release \
201-
NO_LOAD="$$(LIBUV_NO_LOAD)" \
189+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
190+
host=android OS=linux \
202191
V=$$(VERBOSE)
203192
else
204-
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)_$(2))
205-
$$(Q)$$(MAKE) -C $$(@D) \
193+
$$(LIBUV_LIB_$(1)_$(2)): $$(LIBUV_DEPS)
194+
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
206195
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
207196
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
208197
CC="$$(CC_$(1))" \
209198
CXX="$$(CXX_$(1))" \
210199
AR="$$(AR_$(1))" \
211-
builddir="." \
212-
BUILDTYPE=Release \
213-
NO_LOAD="$$(LIBUV_NO_LOAD)" \
200+
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/stage$(2)/libuv" \
214201
V=$$(VERBOSE)
215202
endif
216203

@@ -274,7 +261,3 @@ endef
274261
$(foreach stage,$(STAGES), \
275262
$(foreach target,$(CFG_TARGET_TRIPLES), \
276263
$(eval $(call DEF_RUNTIME_TARGETS,$(target),$(stage)))))
277-
278-
$(LIBUV_GYP):
279-
mkdir -p $(S)src/libuv/build
280-
git clone https://git.chromium.org/external/gyp.git $(S)src/libuv/build/gyp

branches/dist-snap/mk/tests.mk

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,15 +476,15 @@ RFAIL_RC := $(wildcard $(S)src/test/run-fail/*.rc)
476476
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
477477
CFAIL_RC := $(wildcard $(S)src/test/compile-fail/*.rc)
478478
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
479-
BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
479+
BENCH_RS := $(wildcard $(S)src/test/bench/rt/*.rs $(S)src/test/bench/shootout/*.rs $(S)src/test/bench/std/*.rs $(S)src/test/bench/*.rs)
480480
PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
481481
DEBUGINFO_RS := $(wildcard $(S)src/test/debug-info/*.rs)
482482
CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
483483
CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
484484

485485
# perf tests are the same as bench tests only they run under
486486
# a performance monitor.
487-
PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
487+
PERF_RS := $(BENCH_RS)
488488

489489
RPASS_TESTS := $(RPASS_RC) $(RPASS_RS)
490490
RPASS_FULL_TESTS := $(RPASS_FULL_RC) $(RPASS_FULL_RS)
@@ -516,7 +516,7 @@ CTEST_BUILD_BASE_cfail = compile-fail
516516
CTEST_MODE_cfail = compile-fail
517517
CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL)
518518

519-
CTEST_SRC_BASE_bench = bench
519+
CTEST_SRC_BASE_bench = bench bench/rt bench/shootout bench/std
520520
CTEST_BUILD_BASE_bench = bench
521521
CTEST_MODE_bench = run-pass
522522
CTEST_RUNTOOL_bench = $(CTEST_RUNTOOL)
@@ -610,7 +610,8 @@ define DEF_RUN_COMPILETEST
610610

611611
CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
612612
$$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
613-
--src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
613+
$(foreach base,$$(CTEST_SRC_BASE_$(4)), \
614+
--src-base $$(S)src/test/$$(base))/ \
614615
--build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
615616
--ratchet-metrics $(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) \
616617
--mode $$(CTEST_MODE_$(4)) \

branches/dist-snap/src/compiletest/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct config {
3636
llvm_bin_path: Option<Path>,
3737

3838
// The directory containing the tests to run
39-
src_base: Path,
39+
src_base: ~[Path],
4040

4141
// The directory where programs should be built
4242
build_base: Path,

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

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::os;
1919
use std::f64;
2020

2121
use extra::getopts;
22-
use extra::getopts::groups::{optopt, optflag, reqopt};
22+
use extra::getopts::groups::{optopt, optflag, reqopt, optmulti};
2323
use extra::test;
2424

2525
use common::config;
@@ -49,19 +49,19 @@ pub fn main() {
4949
pub fn parse_config(args: ~[~str]) -> config {
5050

5151
let groups : ~[getopts::groups::OptGroup] =
52-
~[reqopt("", "compile-lib-path", "path to host shared libraries", "PATH"),
53-
reqopt("", "run-lib-path", "path to target shared libraries", "PATH"),
54-
reqopt("", "rustc-path", "path to rustc to use for compiling", "PATH"),
55-
optopt("", "clang-path", "path to executable for codegen tests", "PATH"),
56-
optopt("", "llvm-bin-path", "path to directory holding llvm binaries", "DIR"),
57-
reqopt("", "src-base", "directory to scan for test files", "PATH"),
58-
reqopt("", "build-base", "directory to deposit test outputs", "PATH"),
59-
reqopt("", "aux-base", "directory to find auxiliary test files", "PATH"),
60-
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
61-
reqopt("", "mode", "which sort of compile tests to run",
62-
"(compile-fail|run-fail|run-pass|pretty|debug-info)"),
63-
optflag("", "ignored", "run tests marked as ignored / xfailed"),
64-
optopt("", "runtool", "supervisor program to run tests under \
52+
~[reqopt ("", "compile-lib-path", "path to host shared libraries", "PATH"),
53+
reqopt ("", "run-lib-path", "path to target shared libraries", "PATH"),
54+
reqopt ("", "rustc-path", "path to rustc to use for compiling", "PATH"),
55+
optopt ("", "clang-path", "path to executable for codegen tests", "PATH"),
56+
optopt ("", "llvm-bin-path", "path to directory holding llvm binaries", "DIR"),
57+
optmulti ("", "src-base", "directory to scan for test files", "PATH"),
58+
reqopt ("", "build-base", "directory to deposit test outputs", "PATH"),
59+
reqopt ("", "aux-base", "directory to find auxiliary test files", "PATH"),
60+
reqopt ("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
61+
reqopt ("", "mode", "which sort of compile tests to run",
62+
" (compile-fail|run-fail|run-pass|pretty|debug-info)"),
63+
optflag ("", "ignored", "run tests marked as ignored / xfailed"),
64+
optopt ("", "runtool", "supervisor program to run tests under \
6565
(eg. emulator, valgrind)", "PROGRAM"),
6666
optopt("", "rustcflags", "flags to pass to rustc", "FLAGS"),
6767
optflag("", "verbose", "run tests verbosely, showing all output"),
@@ -106,13 +106,15 @@ pub fn parse_config(args: ~[~str]) -> config {
106106
Path(getopts::opt_str(m, nm))
107107
}
108108

109+
let src_base = getopts::opt_strs(matches, "src-base");
110+
109111
config {
110112
compile_lib_path: getopts::opt_str(matches, "compile-lib-path"),
111113
run_lib_path: getopts::opt_str(matches, "run-lib-path"),
112114
rustc_path: opt_path(matches, "rustc-path"),
113115
clang_path: getopts::opt_maybe_str(matches, "clang-path").map_move(|s| Path(s)),
114116
llvm_bin_path: getopts::opt_maybe_str(matches, "llvm-bin-path").map_move(|s| Path(s)),
115-
src_base: opt_path(matches, "src-base"),
117+
src_base: src_base.iter().map(|x| Path(x.clone())).collect(),
116118
build_base: opt_path(matches, "build-base"),
117119
aux_base: opt_path(matches, "aux-base"),
118120
stage_id: getopts::opt_str(matches, "stage-id"),
@@ -248,7 +250,7 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
248250
debug!("making tests from %s",
249251
config.src_base.to_str());
250252
let mut tests = ~[];
251-
let dirs = os::list_dir_path(&config.src_base);
253+
let dirs = config.src_base.iter().flat_map(|x| os::list_dir_path(x).move_iter()).to_owned_vec();
252254
for file in dirs.iter() {
253255
let file = file.clone();
254256
debug!("inspecting file %s", file.to_str());

branches/dist-snap/src/compiletest/procsrv.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ pub fn run(lib_path: &str,
5454
in_fd: None,
5555
out_fd: None,
5656
err_fd: None
57-
}).unwrap();
57+
});
5858

5959
for input in input.iter() {
60-
proc.input().write(input.as_bytes());
60+
proc.input().write_str(*input);
6161
}
6262
let output = proc.finish_with_output();
6363

branches/dist-snap/src/compiletest/runtest.rs

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,41 @@ use procsrv;
2020
use util;
2121
use util::logv;
2222

23+
use std::cell::Cell;
2324
use std::io;
2425
use std::os;
2526
use std::str;
27+
use std::task::{spawn_sched, SingleThreaded};
2628
use std::vec;
29+
use std::unstable::running_on_valgrind;
2730

2831
use extra::test::MetricMap;
2932

3033
pub fn run(config: config, testfile: ~str) {
31-
let mut _mm = MetricMap::new();
32-
run_metrics(config, testfile, &mut _mm);
34+
let config = Cell::new(config);
35+
let testfile = Cell::new(testfile);
36+
// FIXME #6436: Creating another thread to run the test because this
37+
// is going to call waitpid. The new scheduler has some strange
38+
// interaction between the blocking tasks and 'friend' schedulers
39+
// that destroys parallelism if we let normal schedulers block.
40+
// It should be possible to remove this spawn once std::run is
41+
// rewritten to be non-blocking.
42+
//
43+
// We do _not_ create another thread if we're running on V because
44+
// it serializes all threads anyways.
45+
if running_on_valgrind() {
46+
let config = config.take();
47+
let testfile = testfile.take();
48+
let mut _mm = MetricMap::new();
49+
run_metrics(config, testfile, &mut _mm);
50+
} else {
51+
do spawn_sched(SingleThreaded) {
52+
let config = config.take();
53+
let testfile = testfile.take();
54+
let mut _mm = MetricMap::new();
55+
run_metrics(config, testfile, &mut _mm);
56+
}
57+
}
3358
}
3459

3560
pub fn run_metrics(config: config, testfile: ~str, mm: &mut MetricMap) {

branches/dist-snap/src/etc/emacs/rust-mode.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@
2929

3030
table))
3131

32-
(defcustom rust-indent-offset default-tab-width
33-
"*Indent Rust code by this number of spaces.
34-
35-
The initializer is `DEFAULT-TAB-WIDTH'.")
32+
(defcustom rust-indent-offset 4
33+
"*Indent Rust code by this number of spaces.")
3634

3735
(defun rust-paren-level () (nth 0 (syntax-ppss)))
3836
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
@@ -61,10 +59,11 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
6159

6260
;; If we're in any other token-tree / sexp, then:
6361
;; - [ or ( means line up with the opening token
64-
;; - { means indent to either nesting-level * tab width,
62+
;; - { means indent to either nesting-level * rust-indent-offset,
6563
;; or one further indent from that if either current line
6664
;; begins with 'else', or previous line didn't end in
67-
;; semi, comma or brace, and wasn't an attribute. PHEW.
65+
;; semi, comma or brace (other than whitespace and line
66+
;; comments) , and wasn't an attribute. PHEW.
6867
((> level 0)
6968
(let ((pt (point)))
7069
(rust-rewind-irrelevant)
@@ -81,7 +80,7 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
8180
(beginning-of-line)
8281
(rust-rewind-irrelevant)
8382
(end-of-line)
84-
(if (looking-back "[{};,]")
83+
(if (looking-back "[,;{}][[:space:]]*\\(?://.*\\)?")
8584
(* rust-indent-offset level)
8685
(back-to-indentation)
8786
(if (looking-at "#")

branches/dist-snap/src/libextra/test.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ The FILTER is matched against the name of all tests to run, and if any tests
203203
have a substring match, only those tests are run.
204204
205205
By default, all tests are run in parallel. This can be altered with the
206-
RUST_THREADS environment variable when running tests (set it to 1).
206+
RUST_TEST_TASKS environment variable when running tests (set it to 1).
207207
208208
Test Attributes:
209209
@@ -740,9 +740,20 @@ static SCHED_OVERCOMMIT : uint = 4u;
740740

741741
fn get_concurrency() -> uint {
742742
use std::rt;
743-
let threads = rt::util::default_sched_threads();
744-
if threads == 1 { 1 }
745-
else { threads * SCHED_OVERCOMMIT }
743+
match os::getenv("RUST_TEST_TASKS") {
744+
Some(s) => {
745+
let opt_n: Option<uint> = FromStr::from_str(s);
746+
match opt_n {
747+
Some(n) if n > 0 => n,
748+
_ => fail!("RUST_TEST_TASKS is `%s`, should be a non-negative integer.", s)
749+
}
750+
}
751+
None => {
752+
let threads = rt::util::default_sched_threads();
753+
if threads == 1 { 1 }
754+
else { threads * SCHED_OVERCOMMIT }
755+
}
756+
}
746757
}
747758

748759
pub fn filter_tests(

branches/dist-snap/src/librustc/middle/resolve.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,13 +2585,11 @@ impl Resolver {
25852585
debug!("(resolving glob import) ... for value target");
25862586
dest_import_resolution.value_target =
25872587
Some(Target(containing_module, name_bindings));
2588-
dest_import_resolution.value_id = id;
25892588
}
25902589
if name_bindings.defined_in_public_namespace(TypeNS) {
25912590
debug!("(resolving glob import) ... for type target");
25922591
dest_import_resolution.type_target =
25932592
Some(Target(containing_module, name_bindings));
2594-
dest_import_resolution.type_id = id;
25952593
}
25962594
};
25972595

branches/dist-snap/src/librustdoc/markdown_writer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ fn pandoc_writer(
104104
];
105105
106106
do generic_writer |markdown| {
107+
use std::io::WriterUtil;
108+
107109
debug!("pandoc cmd: %s", pandoc_cmd);
108110
debug!("pandoc args: %s", pandoc_args.connect(" "));
109111

110-
let proc = run::Process::new(pandoc_cmd, pandoc_args,
111-
run::ProcessOptions::new());
112-
let mut proc = proc.unwrap();
112+
let mut proc = run::Process::new(pandoc_cmd, pandoc_args, run::ProcessOptions::new());
113113

114-
proc.input().write(markdown.as_bytes());
114+
proc.input().write_str(markdown);
115115
let output = proc.finish_with_output();
116116

117117
debug!("pandoc result: %i", output.status);

0 commit comments

Comments
 (0)