aquatic_ws protocol: scrape request: add serde rename for info_hashes

This commit is contained in:
Joakim Frostegård 2020-05-10 12:10:58 +02:00
parent 460a778d0d
commit 806ac5b184

View file

@ -140,7 +140,11 @@ pub struct ScrapeRequest {
// If omitted, scrape for all torrents, apparently
// There is some kind of parsing here too which accepts a single info hash
// and puts it into a vector
#[serde(deserialize_with = "deserialize_info_hashes", default)]
#[serde(
rename = "info_hash",
deserialize_with = "deserialize_info_hashes",
default
)]
pub info_hashes: Vec<InfoHash>,
}