D8399: rust-chg: upgrade to 2018 edition and remove useless extern crates
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Wed Apr 22 15:48:54 UTC 2020
Should we get this on stable instead of default ?
On 4/13/20 6:12 PM, yuja (Yuya Nishihara) wrote:
> Closed by commit rHG3e6e5953c671: rust-chg: upgrade to 2018 edition and remove useless extern crates (authored by yuja).
> This revision was automatically updated to reflect the committed changes.
>
> REPOSITORY
> rHG Mercurial
>
> CHANGES SINCE LAST UPDATE
> https://phab.mercurial-scm.org/D8399?vs=21034&id=21041
>
> CHANGES SINCE LAST ACTION
> https://phab.mercurial-scm.org/D8399/new/
>
> REVISION DETAIL
> https://phab.mercurial-scm.org/D8399
>
> AFFECTED FILES
> rust/chg/Cargo.toml
> rust/chg/build.rs
> rust/chg/src/attachio.rs
> rust/chg/src/lib.rs
> rust/chg/src/locator.rs
> rust/chg/src/main.rs
>
> CHANGE DETAILS
>
> 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};
> 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/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/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/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/Cargo.toml b/rust/chg/Cargo.toml
> --- a/rust/chg/Cargo.toml
> +++ b/rust/chg/Cargo.toml
> @@ -4,6 +4,7 @@
> authors = ["Yuya Nishihara <yuya at tcha.org>"]
> description = "Client for Mercurial command server with cHg extension"
> license = "GPL-2.0+"
> +edition = "2018"
>
> [dependencies]
> bytes = "0.4"
>
>
>
> To: yuja, #hg-reviewers, pulkit
> Cc: mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list