George-Miao / qbit

A Rust library for interacting with qBittorrent's Web API
https://docs.rs/qbit-rs
MIT License
32 stars 12 forks source link

fix: Peer and PeerSyncData structs #9

Closed Lynnesbian closed 8 months ago

Lynnesbian commented 8 months ago

Similarly to the changes made in #8, these commits make the full_update field in PeerSyncData optional. In addition, I've added the missing peers_removed field, which behaves similarly to the other *_removed fields in SyncData (in this case, it's a list of socket addresses to remove).

Also, the Peer struct incorrectly defined progress as an Option<u64>, when it should be an Option<f64> (between 0.0 and 1.0, representing 0% and 100% completion).