diff --git a/rust/chg/Cargo.toml b/rust/chg/Cargo.toml --- a/rust/chg/Cargo.toml +++ b/rust/chg/Cargo.toml @@ -4,6 +4,7 @@ authors = ["Yuya Nishihara "] description = "Client for Mercurial command server with cHg extension" license = "GPL-2.0+" +edition = "2018" [dependencies] bytes = "0.4" diff --git a/rust/chg/build.rs b/rust/chg/build.rs --- a/rust/chg/build.rs +++ b/rust/chg/build.rs @@ -1,5 +1,3 @@ -extern crate cc; - fn main() { cc::Build::new() .warnings(true) diff --git a/rust/chg/src/attachio.rs b/rust/chg/src/attachio.rs --- a/rust/chg/src/attachio.rs +++ b/rust/chg/src/attachio.rs @@ -5,7 +5,7 @@ //! Functions to send client-side fds over the command server channel. -use futures::{Async, Future, Poll}; +use futures::{try_ready, Async, Future, Poll}; use std::io; use std::os::unix::io::AsRawFd; use tokio_hglib::codec::ChannelMessage; diff --git a/rust/chg/src/lib.rs b/rust/chg/src/lib.rs --- a/rust/chg/src/lib.rs +++ b/rust/chg/src/lib.rs @@ -3,17 +3,6 @@ // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. -extern crate bytes; -#[macro_use] -extern crate futures; -extern crate libc; -#[macro_use] -extern crate log; -extern crate tokio; -extern crate tokio_hglib; -extern crate tokio_process; -extern crate tokio_timer; - mod attachio; mod clientext; pub mod locator; diff --git a/rust/chg/src/locator.rs b/rust/chg/src/locator.rs --- a/rust/chg/src/locator.rs +++ b/rust/chg/src/locator.rs @@ -6,6 +6,7 @@ //! Utility for locating command-server process. use futures::future::{self, Either, Loop}; +use log::debug; use std::env; use std::ffi::{OsStr, OsString}; use std::fs::{self, DirBuilder}; diff --git a/rust/chg/src/main.rs b/rust/chg/src/main.rs --- a/rust/chg/src/main.rs +++ b/rust/chg/src/main.rs @@ -3,12 +3,6 @@ // This software may be used and distributed according to the terms of the // GNU General Public License version 2 or any later version. -extern crate chg; -extern crate futures; -extern crate log; -extern crate tokio; -extern crate tokio_hglib; - use chg::locator::{self, Locator}; use chg::procutil; use chg::{ChgClientExt, ChgUiHandler};