refactor(tests): reformat code and update dependency management
- Reorganized import statements in adapter tests for better readability - Replaced or_insert_with(Vec::new) with or_default() in test closures - Updated Cargo.lock with new dependency versions and checksums - Added TLS features to tonic dependency configuration - Included sqlx, chrono, and uuid dependencies with specific features - Added jsonwebtoken and arc-swap as project dependencies - Reformatted assertion statements to comply with line length limits - Adjusted base64 import order in engine codec module - Updated protobuf include statement formatting
This commit is contained in:
+5
-6
@@ -61,11 +61,10 @@ pub struct Packet {
|
||||
|
||||
impl Packet {
|
||||
pub fn open(handshake: &HandshakeData) -> Self {
|
||||
let data = serde_json::to_string(handshake)
|
||||
.unwrap_or_else(|e| {
|
||||
tracing::error!("Failed to serialize handshake data: {}", e);
|
||||
"{}".to_string()
|
||||
});
|
||||
let data = serde_json::to_string(handshake).unwrap_or_else(|e| {
|
||||
tracing::error!("Failed to serialize handshake data: {}", e);
|
||||
"{}".to_string()
|
||||
});
|
||||
Self {
|
||||
packet_type: PacketType::Open,
|
||||
data: PacketData::Text(data),
|
||||
@@ -148,4 +147,4 @@ pub enum PacketError {
|
||||
InvalidUtf8(#[from] std::string::FromUtf8Error),
|
||||
#[error("serialization error: {0}")]
|
||||
Serialization(String),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user