Patchwork D8400: rust-chg: use "crate::" to import local modules

login
register
mail settings
Submitter phabricator
Date April 13, 2020, 4:12 p.m.
Message ID <10823ffea5615883939c9f9d8c5fa0d1@localhost.localdomain>
Download mbox | patch
Permalink /patch/46073/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2020, 4:12 p.m.
Closed by commit rHGfb1adb7588c6: rust-chg: use &quot;crate::&quot; to import local modules (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/D8400?vs=21035&id=21042

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8400/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8400

AFFECTED FILES
  rust/chg/src/attachio.rs
  rust/chg/src/clientext.rs
  rust/chg/src/locator.rs
  rust/chg/src/runcommand.rs
  rust/chg/src/uihandler.rs

CHANGE DETAILS




To: yuja, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/rust/chg/src/uihandler.rs b/rust/chg/src/uihandler.rs
--- a/rust/chg/src/uihandler.rs
+++ b/rust/chg/src/uihandler.rs
@@ -12,8 +12,8 @@ 
 use tokio;
 use tokio_process::{ChildStdin, CommandExt};
 
-use super::message::CommandSpec;
-use super::procutil;
+use crate::message::CommandSpec;
+use crate::procutil;
 
 /// Callback to process shell command requests received from server.
 pub trait SystemHandler: Sized {
diff --git a/rust/chg/src/runcommand.rs b/rust/chg/src/runcommand.rs
--- a/rust/chg/src/runcommand.rs
+++ b/rust/chg/src/runcommand.rs
@@ -15,9 +15,9 @@ 
 use tokio_hglib::protocol::MessageLoop;
 use tokio_hglib::{Client, Connection};
 
-use super::attachio::AttachIo;
-use super::message::{self, CommandType};
-use super::uihandler::SystemHandler;
+use crate::attachio::AttachIo;
+use crate::message::{self, CommandType};
+use crate::uihandler::SystemHandler;
 
 enum AsyncS<R, S> {
     Ready(R),
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
@@ -21,9 +21,9 @@ 
 use tokio_process::{Child, CommandExt};
 use tokio_timer;
 
-use super::clientext::ChgClientExt;
-use super::message::{Instruction, ServerSpec};
-use super::procutil;
+use crate::clientext::ChgClientExt;
+use crate::message::{Instruction, ServerSpec};
+use crate::procutil;
 
 const REQUIRED_SERVER_CAPABILITIES: &[&str] = &[
     "attachio",
diff --git a/rust/chg/src/clientext.rs b/rust/chg/src/clientext.rs
--- a/rust/chg/src/clientext.rs
+++ b/rust/chg/src/clientext.rs
@@ -15,10 +15,10 @@ 
 use tokio_hglib::protocol::{OneShotQuery, OneShotRequest};
 use tokio_hglib::{Client, Connection};
 
-use super::attachio::AttachIo;
-use super::message::{self, Instruction};
-use super::runcommand::ChgRunCommand;
-use super::uihandler::SystemHandler;
+use crate::attachio::AttachIo;
+use crate::message::{self, Instruction};
+use crate::runcommand::ChgRunCommand;
+use crate::uihandler::SystemHandler;
 
 pub trait ChgClientExt<C>
 where
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
@@ -12,8 +12,8 @@ 
 use tokio_hglib::protocol::MessageLoop;
 use tokio_hglib::{Client, Connection};
 
-use super::message;
-use super::procutil;
+use crate::message;
+use crate::procutil;
 
 /// Future to send client-side fds over the command server channel.
 ///