Skip to content

Commit a2dc03d

Browse files
authored
fix: target build and cargo fmt issues (#50)
This pull request includes several changes to improve code organization and update the toolchain configuration. The most important changes include switching the Rust toolchain channel from nightly to stable and reorganizing imports across multiple files for better readability and consistency. Toolchain update: * [`rust-toolchain.toml`](diffhunk://#diff-2b1bde2cf3a858b7bf7424cb8bcbf01f35b94dc80b925d9432cbab3319ca9b4eL2-R2): Changed the Rust toolchain channel from `nightly` to `stable`. Import reorganization: * [`src/cluster/scylla_cluster.rs`](diffhunk://#diff-a328ddcad66c7331981f0504e0e7c898b94bb7627b3dc3749bd2953f65a1a3ccL8-R8): Reordered imports for `ClusterConfig` and `Compression` to improve readability. * [`src/helpers/query_parameter.rs`](diffhunk://#diff-e6b61072519444eb27a091fedb6a7844299039dc6f7689a72ed61c8d16fa8cd1L2-R4): Reorganized imports for `RowWriter` and `SerializationError` for consistency. * [`src/helpers/query_results.rs`](diffhunk://#diff-c46f185a1370949dddf3212dc1936e62a30f230871954ff78ac2119f8611b0a5L3-R3): Reordered `napi::bindgen_prelude` imports for better readability. * [`src/session/scylla_session.rs`](diffhunk://#diff-5d57737517755d2efee92f675121d13b74122292d129d971a4a1baff5a9f5032L9-R10): Moved `napi::Either` import to maintain consistent import order. * [`src/session/topology.rs`](diffhunk://#diff-0021f8a05dab631179ba1f51c0e5c0371537704b22bb2d32b1069e0ceec30a45L5-R6): Reorganized `scylla::transport::ClusterData` import for better readability. --------- Signed-off-by: Gabriel do Carmo Vieira <48625433+gvieira18@users.noreply.github.com>
1 parent 3dfa054 commit a2dc03d

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "nightly"
2+
channel = "stable"

src/cluster/scylla_cluster.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use openssl::ssl::{SslContextBuilder, SslFiletype};
55

66
use crate::{
77
cluster::{
8-
cluster_config::{ClusterConfig, compression::Compression},
8+
cluster_config::{compression::Compression, ClusterConfig},
99
execution_profile::ExecutionProfile,
1010
},
1111
session::scylla_session::ScyllaSession,

src/helpers/query_parameter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use scylla::serialize::{
2-
RowWriter, SerializationError,
32
row::{RowSerializationContext, SerializeRow},
43
value::SerializeCql,
4+
RowWriter, SerializationError,
55
};
66

77
use super::{cql_value_bridge::ParameterWithMapType, to_cql_value::ToCqlValue};

src/helpers/query_results.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::HashMap;
22

3-
use napi::bindgen_prelude::{BigInt, Either9, Either10, Either11};
3+
use napi::bindgen_prelude::{BigInt, Either10, Either11, Either9};
44
use scylla::frame::response::result::{ColumnType, CqlValue};
55

66
use crate::types::{decimal::Decimal, duration::Duration, uuid::Uuid};

src/session/scylla_session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::query::scylla_prepared_statement::PreparedStatement;
66
use crate::query::scylla_query::Query;
77
use crate::types::tracing::TracingReturn;
88
use crate::types::uuid::Uuid;
9-
use napi::Either;
109
use napi::bindgen_prelude::Either3;
10+
use napi::Either;
1111
use scylla::statement::query::Query as ScyllaQuery;
1212

1313
use super::metrics;

src/session/topology.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use std::collections::HashMap;
22
use std::sync::Arc;
33

44
use napi::bindgen_prelude::Either3;
5-
use scylla::transport::ClusterData;
65
use scylla::transport::topology::{Keyspace, MaterializedView, Strategy, Table};
6+
use scylla::transport::ClusterData;
77

88
// ============= ClusterData ============= //
99
#[napi]

src/types/tracing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ impl Serialize for CqlTimestampWrapper {
1515
where
1616
S: serde::Serializer,
1717
{
18-
serializer.serialize_i64(self.0.0)
18+
serializer.serialize_i64(self.0 .0)
1919
}
2020
}
2121

0 commit comments

Comments
 (0)