-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(test): [#159] refactor tests for scrape request
- Loading branch information
1 parent
c89a1f3
commit 7ee588a
Showing
8 changed files
with
235 additions
and
114 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -72,6 +72,8 @@ | |
"Vagaa", | ||
"Vuze", | ||
"Xtorrent", | ||
"Xunlei" | ||
"Xunlei", | ||
"xxxxxxxxxxxxxxxxxxxxd", | ||
"yyyyyyyyyyyyyyyyyyyyd" | ||
] | ||
} |
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 +1,15 @@ | ||
pub type ByteArray20 = [u8; 20]; | ||
|
||
pub struct InfoHash(ByteArray20); | ||
|
||
impl InfoHash { | ||
pub fn new(vec: &[u8]) -> Self { | ||
let mut byte_array_20: ByteArray20 = Default::default(); | ||
byte_array_20.clone_from_slice(vec); | ||
Self(byte_array_20) | ||
} | ||
|
||
pub fn bytes(&self) -> ByteArray20 { | ||
self.0 | ||
} | ||
} |
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.