mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
aquatic_http: deserialize AnnounceRequest.compact to bool
This commit is contained in:
parent
6fc4b693cd
commit
ff4fcc163d
3 changed files with 40 additions and 3 deletions
|
|
@ -74,8 +74,11 @@ pub struct AnnounceRequest {
|
|||
pub bytes_left: usize,
|
||||
#[serde(default)]
|
||||
pub event: AnnounceEvent,
|
||||
/// FIXME: number: 0 or 1 to bool
|
||||
pub compact: u8,
|
||||
/// FIXME: is optional, so should default to something, maybe `true`
|
||||
#[serde(
|
||||
deserialize_with = "deserialize_bool_from_number"
|
||||
)]
|
||||
pub compact: bool,
|
||||
/// Requested number of peers to return
|
||||
pub numwant: usize,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue