-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1027: Release Version 3.0.0-beta
39ab661 release: version 3.0.0-beta (Jose Celano) 14e672e tracing: add spans to many functions (Cameron Garnham) 3dc75d5 tracing: init tracing-subscriber in intragration tests (Cameron Garnham) e4aa1db tracing: qualify use of tracing macros (Cameron Garnham) 2c4bdab chore: update to v1 of derive more (Cameron Garnham) c5a724e chore: update deps (Cameron Garnham) dcb7770 chore: update contrib bencode (Cameron Garnham) bef5680 dev: vairous fixups (Cameron Garnham) 9362fa5 dev: use aquatic PeerId instead of local one (Cameron Garnham) 03e88d0 dev: use aquatic number_of_bytes (Cameron Garnham) 00af70f dev: remove announce event wrapper (Cameron Garnham) 325df70 dev: use aquatic_udp_protocol InfoHash inside our type (Cameron Garnham) 7779fa3 dev: remove announce_request wrapper (Cameron Garnham) 95333f0 chore(deps): update udp cookie consts due the hasher fn udpate (Jose Celano) 33757e0 chore(deps): update dependencies (Jose Celano) 8fcc016 develop: bump to version 3.0.0-beta-develop (Jose Celano) 592c9cc release: version 3.0.0-alpha.12 (Jose Celano) Pull request description: Release Version 3.0.0-beta ACKs for top commit: josecelano: ACK 39ab661 Tree-SHA512: c2943313343e2375d5910d65c6f5a076866652a7e320bae8ffb77fb82cb0a6629a817554fe03816536e7019ba29717f3f88ee45e6a25beda32b3de58445e0f77
- Loading branch information
Showing
110 changed files
with
1,639 additions
and
1,145 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
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,103 +1,52 @@ | ||
#![allow(unknown_lints)] | ||
#![allow(clippy::iter_without_into_iter)] | ||
use error_chain::error_chain; | ||
use thiserror::Error; | ||
|
||
error_chain! { | ||
types { | ||
BencodeParseError, BencodeParseErrorKind, BencodeParseResultExt, BencodeParseResult; | ||
} | ||
#[allow(clippy::module_name_repetitions)] | ||
#[derive(Error, Debug)] | ||
pub enum BencodeParseError { | ||
#[error("Incomplete Number Of Bytes At {pos}")] | ||
BytesEmpty { pos: usize }, | ||
|
||
errors { | ||
BytesEmpty { | ||
pos: usize | ||
} { | ||
description("Incomplete Number Of Bytes") | ||
display("Incomplete Number Of Bytes At {:?}", pos) | ||
} | ||
InvalidByte { | ||
pos: usize | ||
} { | ||
description("Invalid Byte Found") | ||
display("Invalid Byte Found At {:?}", pos) | ||
} | ||
InvalidIntNoDelimiter { | ||
pos: usize | ||
} { | ||
description("Invalid Integer Found With No Delimiter") | ||
display("Invalid Integer Found With No Delimiter At {:?}", pos) | ||
} | ||
InvalidIntNegativeZero { | ||
pos: usize | ||
} { | ||
description("Invalid Integer Found As Negative Zero") | ||
display("Invalid Integer Found As Negative Zero At {:?}", pos) | ||
} | ||
InvalidIntZeroPadding { | ||
pos: usize | ||
} { | ||
description("Invalid Integer Found With Zero Padding") | ||
display("Invalid Integer Found With Zero Padding At {:?}", pos) | ||
} | ||
InvalidIntParseError { | ||
pos: usize | ||
} { | ||
description("Invalid Integer Found To Fail Parsing") | ||
display("Invalid Integer Found To Fail Parsing At {:?}", pos) | ||
} | ||
InvalidKeyOrdering { | ||
pos: usize, | ||
key: Vec<u8> | ||
} { | ||
description("Invalid Dictionary Key Ordering Found") | ||
display("Invalid Dictionary Key Ordering Found At {:?} For Key {:?}", pos, key) | ||
} | ||
InvalidKeyDuplicates { | ||
pos: usize, | ||
key: Vec<u8> | ||
} { | ||
description("Invalid Dictionary Duplicate Keys Found") | ||
display("Invalid Dictionary Key Found At {:?} For Key {:?}", pos, key) | ||
} | ||
InvalidLengthNegative { | ||
pos: usize | ||
} { | ||
description("Invalid Byte Length Found As Negative") | ||
display("Invalid Byte Length Found As Negative At {:?}", pos) | ||
} | ||
InvalidLengthOverflow { | ||
pos: usize | ||
} { | ||
description("Invalid Byte Length Found To Overflow Buffer Length") | ||
display("Invalid Byte Length Found To Overflow Buffer Length At {:?}", pos) | ||
} | ||
InvalidRecursionExceeded { | ||
pos: usize, | ||
max: usize | ||
} { | ||
description("Invalid Recursion Limit Exceeded") | ||
display("Invalid Recursion Limit Exceeded At {:?} For Limit {:?}", pos, max) | ||
} | ||
} | ||
#[error("Invalid Byte Found At {pos}")] | ||
InvalidByte { pos: usize }, | ||
|
||
#[error("Invalid Integer Found With No Delimiter At {pos}")] | ||
InvalidIntNoDelimiter { pos: usize }, | ||
|
||
#[error("Invalid Integer Found As Negative Zero At {pos}")] | ||
InvalidIntNegativeZero { pos: usize }, | ||
|
||
#[error("Invalid Integer Found With Zero Padding At {pos}")] | ||
InvalidIntZeroPadding { pos: usize }, | ||
|
||
#[error("Invalid Integer Found To Fail Parsing At {pos}")] | ||
InvalidIntParseError { pos: usize }, | ||
|
||
#[error("Invalid Dictionary Key Ordering Found At {pos} For Key {key:?}")] | ||
InvalidKeyOrdering { pos: usize, key: Vec<u8> }, | ||
|
||
#[error("Invalid Dictionary Key Found At {pos} For Key {key:?}")] | ||
InvalidKeyDuplicates { pos: usize, key: Vec<u8> }, | ||
|
||
#[error("Invalid Byte Length Found As Negative At {pos}")] | ||
InvalidLengthNegative { pos: usize }, | ||
|
||
#[error("Invalid Byte Length Found To Overflow Buffer Length At {pos}")] | ||
InvalidLengthOverflow { pos: usize }, | ||
|
||
#[error("Invalid Recursion Limit Exceeded At {pos} For Limit {max}")] | ||
InvalidRecursionExceeded { pos: usize, max: usize }, | ||
} | ||
|
||
error_chain! { | ||
types { | ||
BencodeConvertError, BencodeConvertErrorKind, BencodeConvertResultExt, BencodeConvertResult; | ||
} | ||
pub type BencodeParseResult<T> = Result<T, BencodeParseError>; | ||
|
||
errors { | ||
MissingKey { | ||
key: Vec<u8> | ||
} { | ||
description("Missing Key In Bencode") | ||
display("Missing Key In Bencode For {:?}", key) | ||
} | ||
WrongType { | ||
key: Vec<u8>, | ||
expected_type: String | ||
} { | ||
description("Wrong Type In Bencode") | ||
display("Wrong Type In Bencode For {:?} Expected Type {}", key, expected_type) | ||
} | ||
} | ||
#[allow(clippy::module_name_repetitions)] | ||
#[derive(Error, Debug)] | ||
pub enum BencodeConvertError { | ||
#[error("Missing Key In Bencode For {key:?}")] | ||
MissingKey { key: Vec<u8> }, | ||
|
||
#[error("Wrong Type In Bencode For {key:?} Expected Type {expected_type}")] | ||
WrongType { key: Vec<u8>, expected_type: String }, | ||
} | ||
|
||
pub type BencodeConvertResult<T> = Result<T, BencodeConvertError>; |
Oops, something went wrong.