1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

fix style

This commit is contained in:
Nathan Fox
2018-04-22 11:43:47 -04:00
parent b7b61afacc
commit f8b75c157f
2 changed files with 40 additions and 40 deletions

View File

@@ -181,26 +181,26 @@ impl From<u16> for CloseCode {
#[derive(Debug, Eq, PartialEq, Clone)]
pub struct CloseReason {
pub code: CloseCode,
pub description: Option<String>,
pub code: CloseCode,
pub description: Option<String>,
}
impl From<CloseCode> for CloseReason {
fn from(code: CloseCode) -> Self {
CloseReason {
code,
description: None,
}
}
fn from(code: CloseCode) -> Self {
CloseReason {
code,
description: None,
}
}
}
impl <T: Into<String>> From<(CloseCode, T)> for CloseReason {
fn from(info: (CloseCode, T)) -> Self {
CloseReason{
code: info.0,
description: Some(info.1.into())
}
}
fn from(info: (CloseCode, T)) -> Self {
CloseReason{
code: info.0,
description: Some(info.1.into())
}
}
}
static WS_GUID: &'static str = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";