Skip to content

Commit 6dd08dc

Browse files
committed
chore: addres clippy warnings
1 parent e36ca1e commit 6dd08dc

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

crates/sdk/src/common/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ impl fmt::Display for AlignedError {
6565

6666
#[derive(Debug)]
6767
pub enum SubmitError {
68-
WebSocketConnectionError(tokio_tungstenite::tungstenite::Error),
68+
WebSocketConnectionError(String),
6969
WebSocketClosedUnexpectedlyError(CloseFrame<'static>),
7070
IoError(PathBuf, io::Error),
7171
SerializationError(SerializationError),
@@ -104,7 +104,7 @@ pub enum SubmitError {
104104

105105
impl From<tokio_tungstenite::tungstenite::Error> for SubmitError {
106106
fn from(e: tokio_tungstenite::tungstenite::Error) -> Self {
107-
SubmitError::WebSocketConnectionError(e)
107+
SubmitError::WebSocketConnectionError(e.to_string())
108108
}
109109
}
110110

crates/sdk/src/communication/messaging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub async fn send_messages(
7070
// Send the message
7171
if let Err(e) = ws_write.send(Message::Binary(msg_bin.clone())).await {
7272
error!("Error while sending message: {:?}", e);
73-
sent_verification_data.push(Err(SubmitError::WebSocketConnectionError(e)));
73+
sent_verification_data.push(Err(SubmitError::WebSocketConnectionError(e.to_string())));
7474
return sent_verification_data;
7575
}
7676

crates/sdk/src/verification_layer/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,11 @@ pub async fn submit_multiple(
257257
) -> Vec<Result<AlignedVerificationData, errors::SubmitError>> {
258258
let (ws_stream, _) = match connect_async(network.get_batcher_url()).await {
259259
Ok((ws_stream, response)) => (ws_stream, response),
260-
Err(e) => return vec![Err(errors::SubmitError::WebSocketConnectionError(e))],
260+
Err(e) => {
261+
return vec![Err(errors::SubmitError::WebSocketConnectionError(
262+
e.to_string(),
263+
))]
264+
}
261265
};
262266

263267
debug!("WebSocket handshake has been successfully completed");

0 commit comments

Comments
 (0)