-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: prune dependencies * refactor: replace tokio-tungstenite dep with crates.io version
- Loading branch information
Ben Striegel
authored
Feb 7, 2020
1 parent
2e42258
commit 14ad532
Showing
23 changed files
with
225 additions
and
561 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,18 @@ | ||
use chrono; | ||
use quick_error::quick_error; | ||
use std; | ||
use std::str::Utf8Error; | ||
use std::string::FromUtf8Error; | ||
|
||
quick_error! { | ||
#[derive(Debug)] | ||
pub enum ParseError { | ||
Io(err: std::io::Error) { | ||
from() | ||
description(err.description()) | ||
cause(err) | ||
} | ||
Utf8(err: Utf8Error) { | ||
from() | ||
description(err.description()) | ||
cause(err) | ||
} | ||
FromUtf8(err: FromUtf8Error) { | ||
from() | ||
description(err.description()) | ||
cause(err) | ||
} | ||
Chrono(err: chrono::ParseError) { | ||
from() | ||
description(err.description()) | ||
cause(err) | ||
} | ||
WrongType(descr: String) { | ||
description(descr) | ||
display("Wrong Type {}", descr) | ||
} | ||
InvalidPacket(descr: String) { | ||
description(descr) | ||
display("Invalid Packet {}", descr) | ||
} | ||
Other(err: Box<dyn std::error::Error>) { | ||
cause(&**err) | ||
description(err.description()) | ||
display("Error {}", err.description()) | ||
} | ||
} | ||
#[derive(Debug, thiserror::Error)] | ||
pub enum ParseError { | ||
#[error("I/O Error: {0}")] | ||
IoErr(#[from] std::io::Error), | ||
#[error("UTF-8 Error: {0}")] | ||
Utf8Err(#[from] Utf8Error), | ||
#[error("UTF-8 Conversion Error: {0}")] | ||
FromUtf8Err(#[from] FromUtf8Error), | ||
#[error("Chrono Error: {0}")] | ||
ChronoErr(#[from] chrono::ParseError), | ||
#[error("Invalid Packet: {0}")] | ||
InvalidPacket(String), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.