Skip to content

Commit

Permalink
Merge pull request #481 from weibocom/unusedfeature
Browse files Browse the repository at this point in the history
Unusedfeature
  • Loading branch information
viciousstar authored Jul 29, 2024
2 parents 2dc8b28 + 088da58 commit b43226a
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 122 deletions.
30 changes: 0 additions & 30 deletions agent/src/console.rs

This file was deleted.

2 changes: 0 additions & 2 deletions agent/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ pub(super) fn init(ctx: &Context) {
init_log(&ctx);
init_local_ip(&ctx);
start_metrics_register_task(ctx);
#[cfg(feature = "console-api")]
crate::console::start_console(ctx);

#[cfg(feature = "http")]
crate::http::start(ctx);
Expand Down
1 change: 0 additions & 1 deletion agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use ds::BrzMalloc;
#[global_allocator]
static GLOBAL: BrzMalloc = BrzMalloc {};

mod console;
mod http;
mod prometheus;
mod service;
Expand Down
15 changes: 15 additions & 0 deletions protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ paste = "1.0"
[features]
max_allowed_packet = []
regex = ["dep:regex"]
buffer-pool = []
bigdecimal = []
bigdecimal03 = []
chrono = []
rust_decimal = []
time = []
time03 = []
uuid = []
rustc_serialize = []
native-tls = []
rustls = []
frunk = []
nightly = []
rustls-tls = []


[dev-dependencies]
proptest = "1.0"
1 change: 1 addition & 0 deletions protocol/src/kv/common/misc/raw/seq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ where
}

/// Representation of a serialized bytes.
#[allow(dead_code)]
pub trait SeqRepr {
/// Maximum number of items in a sequence (depends on how lenght is stored).
const MAX_LEN: usize;
Expand Down
1 change: 1 addition & 0 deletions protocol/src/kv/common/packets/binlog_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use super::{BinlogDumpFlags, Sid};
/// Binlog request representation. Please consult MySql documentation.
///
/// This struct is a helper builder for [`ComBinlogDump`] and [`ComBinlogDumpGtid`].
#[allow(dead_code)]
#[derive(Debug, Clone, Eq, PartialEq, Hash)]
pub struct BinlogRequest<'a> {
/// Server id of a slave.
Expand Down
2 changes: 2 additions & 0 deletions protocol/src/kv/common/packets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2259,6 +2259,7 @@ define_const!(
1
);

#[allow(dead_code)]
#[derive(Debug, Clone, PartialEq)]
pub struct ComStmtExecuteRequest<'a> {
com_stmt_execute: ComStmtExecuteHeader,
Expand Down Expand Up @@ -2365,6 +2366,7 @@ define_header!(
InvalidComStmtSendLongDataHeader
);

#[allow(dead_code)]
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct ComStmtSendLongData {
__header: ComStmtSendLongDataHeader,
Expand Down
1 change: 1 addition & 0 deletions protocol/src/kv/common/query_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ impl<T: crate::kv::prelude::Protocol, S: Stream> Drop for ResultSet<'_, '_, T, S
}
}

#[allow(dead_code)]
#[derive(Debug, Clone, PartialEq)]
pub struct SetColumns<'a> {
inner: Option<&'a Arc<[Column]>>,
Expand Down
7 changes: 1 addition & 6 deletions protocol/src/vector/query_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub use crate::kv::common::proto::Text;
use super::packet::MysqlRawPacket;
use crate::kv::common::{io::ParseBuf, packets::OkPacket, row::RowDeserializer};

use std::{marker::PhantomData, sync::Arc};
use std::marker::PhantomData;

use crate::kv::common::packets::{Column, OldEofPacket, ResultSetTerminator};
use crate::kv::common::query_result::{Or, SetIteratorState};
Expand Down Expand Up @@ -181,11 +181,6 @@ impl<T: crate::kv::prelude::Protocol> QueryResult<T> {
}
}

#[derive(Debug, Clone, PartialEq)]
pub struct SetColumns<'a> {
inner: Option<&'a Arc<[Column]>>,
}

#[inline]
pub fn format_to_redis(rows: &Vec<Row>) -> Vec<u8> {
let mut data = Vec::with_capacity(32 * rows.len());
Expand Down
3 changes: 3 additions & 0 deletions stream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ array-init = "2"
ctor = "0.1.23"

tokio.workspace = true

[features]
trace = []
6 changes: 4 additions & 2 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ rand = "0.8.5"
md5 = "*"
byteorder = "1.4.3"
assert-panic = "1.0.1"
metrics = { path = "../metrics", features = ["mock-local-ip"]}
metrics = { path = "../metrics", features = ["mock-local-ip"] }
endpoint = { path = "../endpoint" }
context = { path = "../context" }

tokio.workspace = true
ctor = "0.1.23"
mysql_async ="0.31.3"
mysql_async = "0.31.3"
chrono = "0.4"
lazy_static = "*"

Expand Down Expand Up @@ -54,3 +54,5 @@ layout-min = ["ds/tsc"]
layout-max = ["rt/poll-io-metrics"]
regex = ["protocol/regex"]
github_workflow = []
time = []
nightly = []
1 change: 0 additions & 1 deletion tests/src/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ mod proto_hook;
mod ring_buffer;
mod select;
mod shard_checker;
mod time;
mod tx_buffer;
3 changes: 0 additions & 3 deletions tests/src/time.rs

This file was deleted.

1 change: 0 additions & 1 deletion tests_integration/src/all.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod api;
mod ci;
mod counterservice;
// mod hasher;
Expand Down
76 changes: 0 additions & 76 deletions tests_integration/src/api.rs

This file was deleted.

0 comments on commit b43226a

Please sign in to comment.