feat: using workspace crate deps (#3924)

* chore: workspace deps

* chore: use workspace deps
This commit is contained in:
Nathan.fooo
2023-11-12 21:18:27 +08:00
committed by GitHub
parent 7eb20b232a
commit 50e612511d
40 changed files with 437 additions and 339 deletions

View File

@ -9,27 +9,27 @@ edition = "2018"
pin-project = "1.0"
futures-core = { version = "0.3", default-features = false }
futures-channel = "0.3.26"
futures = "0.3.26"
futures.workspace = true
futures-util = "0.3.26"
bytes = {version = "1.4", features = ["serde"]}
tokio = { version = "1.26", features = ["full"] }
tokio = { workspace = true, features = ["full"] }
nanoid = "0.4.0"
log = "0.4.17"
thread-id = "3.3.0"
dyn-clone = "1.0"
derivative = "2.2.0"
serde_json = {version = "1.0", optional = true }
serde_json = { workspace = true, optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_repr = { version = "0.1", optional = true }
serde_repr = { workspace = true, optional = true }
validator = "0.16.1"
tracing = { version = "0.1"}
tracing.workspace = true
parking_lot = "0.12"
#optional crate
bincode = { version = "1.3", optional = true}
protobuf = {version = "2.28.0", optional = true}
protobuf = { workspace = true, optional = true }
[dev-dependencies]
tokio = { version = "1.26", features = ["full"] }
tokio = { workspace = true, features = ["full"] }
futures-util = "0.3.26"
[features]

View File

@ -78,7 +78,7 @@ where
fn respond_to(self, _request: &AFPluginEventRequest) -> AFPluginEventResponse {
match self.into_inner().into_bytes() {
Ok(bytes) => {
log::trace!(
tracing::trace!(
"Serialize Data: {:?} to event response",
std::any::type_name::<T>()
);

View File

@ -67,7 +67,7 @@ where
"Failed to get the plugin state of type: {}",
type_name::<T>()
);
log::error!("{}", msg,);
tracing::error!("{}", msg,);
ready(Err(InternalError::Other(msg).into()))
}
}

View File

@ -80,7 +80,7 @@ impl FromAFPluginRequest for String {
}
pub fn unexpected_none_payload(request: &AFPluginEventRequest) -> DispatchError {
log::warn!("{:?} expected payload", &request.event);
tracing::warn!("{:?} expected payload", &request.event);
InternalError::UnexpectedNone("Expected payload".to_string()).into()
}