From bd949495568e08c43ffd45ed831e8bb9ecbbb754 Mon Sep 17 00:00:00 2001 From: Shylock Hg <33566796+Shylock-Hg@users.noreply.github.com> Date: Wed, 21 Jul 2021 16:09:02 +0800 Subject: [PATCH] Fix the naming style, and unify the graph client module. (#5) --- src/{gClient/mod.rs => graph_client/Connection.rs} | 4 +--- src/{gClient => graph_client}/ConnectionPool.rs | 2 ++ src/{gClient => graph_client}/PoolConfig.rs | 2 ++ src/{gClient => graph_client}/Session.rs | 2 ++ src/{gClient/Connection.rs => graph_client/mod.rs} | 0 src/lib.rs | 3 +-- tests/test_connection.rs | 2 +- 7 files changed, 9 insertions(+), 6 deletions(-) rename src/{gClient/mod.rs => graph_client/Connection.rs} (77%) rename src/{gClient => graph_client}/ConnectionPool.rs (90%) rename src/{gClient => graph_client}/PoolConfig.rs (90%) rename src/{gClient => graph_client}/Session.rs (90%) rename src/{gClient/Connection.rs => graph_client/mod.rs} (100%) diff --git a/src/gClient/mod.rs b/src/graph_client/Connection.rs similarity index 77% rename from src/gClient/mod.rs rename to src/graph_client/Connection.rs index 3cbb5c5..c4e7abb 100644 --- a/src/gClient/mod.rs +++ b/src/graph_client/Connection.rs @@ -4,6 +4,4 @@ * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ -pub mod Session; -pub mod Connection; -pub mod PoolConfig; +mod graph_client {}; diff --git a/src/gClient/ConnectionPool.rs b/src/graph_client/ConnectionPool.rs similarity index 90% rename from src/gClient/ConnectionPool.rs rename to src/graph_client/ConnectionPool.rs index 02dec6a..c4e7abb 100644 --- a/src/gClient/ConnectionPool.rs +++ b/src/graph_client/ConnectionPool.rs @@ -3,3 +3,5 @@ * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ + +mod graph_client {}; diff --git a/src/gClient/PoolConfig.rs b/src/graph_client/PoolConfig.rs similarity index 90% rename from src/gClient/PoolConfig.rs rename to src/graph_client/PoolConfig.rs index 2ab9cc6..33c14ca 100644 --- a/src/gClient/PoolConfig.rs +++ b/src/graph_client/PoolConfig.rs @@ -3,3 +3,5 @@ * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ + +mod graph_client {}; diff --git a/src/gClient/Session.rs b/src/graph_client/Session.rs similarity index 90% rename from src/gClient/Session.rs rename to src/graph_client/Session.rs index 02dec6a..c4e7abb 100644 --- a/src/gClient/Session.rs +++ b/src/graph_client/Session.rs @@ -3,3 +3,5 @@ * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ + +mod graph_client {}; diff --git a/src/gClient/Connection.rs b/src/graph_client/mod.rs similarity index 100% rename from src/gClient/Connection.rs rename to src/graph_client/mod.rs diff --git a/src/lib.rs b/src/lib.rs index fcf7ed5..1a42596 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,5 +4,4 @@ * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ -pub mod gClient; -pub use gClient::{Connection, Session, PoolConfig}; +pub mod graph_client; diff --git a/tests/test_connection.rs b/tests/test_connection.rs index 938e7b0..dfa58ee 100644 --- a/tests/test_connection.rs +++ b/tests/test_connection.rs @@ -8,7 +8,7 @@ extern crate nebula_rust; #[cfg(test)] mod test_session { - use nebula_rust::gClient::Session::Session; + use nebula_rust::graph_client; #[test] fn new_session() {