You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/05/30 07:37:11 UTC

[incubator-opendal] 02/04: Format code

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch release-0.36.0-rc1
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit d4c27096aeff20edd720d49037b6656e792b1e65
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue May 30 15:23:49 2023 +0800

    Format code
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 bindings/c/src/lib.rs                  | 1 -
 bindings/c/src/types.rs                | 5 +++--
 bindings/java/src/blocking_operator.rs | 3 ++-
 bindings/java/src/operator.rs          | 7 ++++---
 core/src/services/cos/backend.rs       | 1 -
 core/src/services/dashmap/backend.rs   | 1 -
 core/src/services/fs/backend.rs        | 1 -
 7 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/bindings/c/src/lib.rs b/bindings/c/src/lib.rs
index 87652af0..ad12e4d2 100644
--- a/bindings/c/src/lib.rs
+++ b/bindings/c/src/lib.rs
@@ -47,7 +47,6 @@ use crate::types::opendal_operator_ptr;
 /// opendal_operator_options_set(&options, "root", "/myroot");
 ///
 /// opendal_operator_ptr ptr = opendal_operator_new("memory", options);
-///
 // free the options right away since the options is not used later on
 /// opendal_operator_options_free(&options);
 ///
diff --git a/bindings/c/src/types.rs b/bindings/c/src/types.rs
index cd4c5f55..8c47bcbf 100644
--- a/bindings/c/src/types.rs
+++ b/bindings/c/src/types.rs
@@ -15,9 +15,10 @@
 // specific language governing permissions and limitations
 // under the License.
 
-use ::opendal as od;
+use std::collections::HashMap;
+use std::os::raw::c_char;
 
-use std::{collections::HashMap, os::raw::c_char};
+use ::opendal as od;
 
 /// The [`opendal_operator_ptr`] owns a pointer to a [`od::BlockingOperator`].
 /// It is also the key struct that OpenDAL's APIs access the real
diff --git a/bindings/java/src/blocking_operator.rs b/bindings/java/src/blocking_operator.rs
index 68944b8b..ff1c894a 100644
--- a/bindings/java/src/blocking_operator.rs
+++ b/bindings/java/src/blocking_operator.rs
@@ -17,9 +17,10 @@
 
 use std::str::FromStr;
 
+use jni::objects::JByteArray;
+use jni::objects::JClass;
 use jni::objects::JObject;
 use jni::objects::JString;
-use jni::objects::{JByteArray, JClass};
 use jni::sys::jlong;
 use jni::sys::jstring;
 use jni::JNIEnv;
diff --git a/bindings/java/src/operator.rs b/bindings/java/src/operator.rs
index 7b8f415a..0fc184d2 100644
--- a/bindings/java/src/operator.rs
+++ b/bindings/java/src/operator.rs
@@ -17,20 +17,21 @@
 
 use std::str::FromStr;
 
+use jni::objects::JByteArray;
+use jni::objects::JClass;
 use jni::objects::JObject;
 use jni::objects::JString;
 use jni::objects::JValue;
 use jni::objects::JValueOwned;
-use jni::objects::{JByteArray, JClass};
 use jni::sys::jlong;
 use jni::JNIEnv;
-
 use opendal::Operator;
 use opendal::Scheme;
 
+use crate::get_current_env;
+use crate::get_global_runtime;
 use crate::jmap_to_hashmap;
 use crate::Result;
-use crate::{get_current_env, get_global_runtime};
 
 #[no_mangle]
 pub extern "system" fn Java_org_apache_opendal_Operator_constructor(
diff --git a/core/src/services/cos/backend.rs b/core/src/services/cos/backend.rs
index 65daf081..83aa896a 100644
--- a/core/src/services/cos/backend.rs
+++ b/core/src/services/cos/backend.rs
@@ -36,7 +36,6 @@ use crate::services::cos::appender::CosAppender;
 use crate::*;
 
 /// Huawei Cloud COS services support.
-///
 #[doc = include_str!("docs.md")]
 #[derive(Default, Clone)]
 pub struct CosBuilder {
diff --git a/core/src/services/dashmap/backend.rs b/core/src/services/dashmap/backend.rs
index e7521456..df2c80ea 100644
--- a/core/src/services/dashmap/backend.rs
+++ b/core/src/services/dashmap/backend.rs
@@ -25,7 +25,6 @@ use crate::raw::adapters::typed_kv;
 use crate::*;
 
 /// [dashmap](https://github.com/xacrimon/dashmap) backend support.
-///
 #[doc = include_str!("docs.md")]
 #[derive(Default)]
 pub struct DashmapBuilder {
diff --git a/core/src/services/fs/backend.rs b/core/src/services/fs/backend.rs
index 98cb46bc..6fcc9ffa 100644
--- a/core/src/services/fs/backend.rs
+++ b/core/src/services/fs/backend.rs
@@ -35,7 +35,6 @@ use crate::raw::*;
 use crate::*;
 
 /// POSIX file system support.
-///
 #[doc = include_str!("docs.md")]
 #[derive(Default, Debug)]
 pub struct FsBuilder {