Make "announce-list" optional

This commit is contained in:
Igor Katson 2023-07-11 22:27:02 +01:00
parent c19d757be4
commit 3428de8f3d
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -28,7 +28,7 @@ pub fn torrent_from_bytes<'de, ByteBuf: Deserialize<'de>>(
#[derive(Deserialize, Debug, Clone)]
pub struct TorrentMetaV1<BufType> {
pub announce: BufType,
#[serde(rename = "announce-list")]
#[serde(rename = "announce-list", default = "Vec::new")]
pub announce_list: Vec<Vec<BufType>>,
pub info: TorrentMetaV1Info<BufType>,
pub comment: Option<BufType>,