From 7ead7071fc8a5ccd2bca51c78a606f2f11afbaa7 Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Wed, 1 May 2019 19:33:44 +0200 Subject: [PATCH] try avoiding duplicat defs --- build.rs | 4 +--- examples/repl/main.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/build.rs b/build.rs index ecbc8e299..91b08f231 100644 --- a/build.rs +++ b/build.rs @@ -18,9 +18,7 @@ fn add_search_path(p: &str) { fn build_tools() { let mut config = cc::Build::new(); - config.file("misc.h"); - config.file("misc.c"); - config.compile("libtools.a"); + config.file("misc.c").compile("libtools.a"); println!("rerun-if-changed=build.rs"); println!("rerun-if-changed=misc.h"); diff --git a/examples/repl/main.rs b/examples/repl/main.rs index dc2fe7093..9dda5a618 100644 --- a/examples/repl/main.rs +++ b/examples/repl/main.rs @@ -380,7 +380,7 @@ unsafe extern "C" fn stop_threads(mut context: *mut dc_context_t) { ******************************************************************************/ fn read_cmd() -> String { print!("> "); - io::stdout().flush(); + io::stdout().flush().unwrap(); let mut input = String::new(); io::stdin().read_line(&mut input).unwrap();