Skip to content

fix: change Peer's relevance type from Option<u64> to Option<f64>#37

Merged
George-Miao merged 1 commit intoGeorge-Miao:masterfrom
xuanya0:master
Feb 24, 2026
Merged

fix: change Peer's relevance type from Option<u64> to Option<f64>#37
George-Miao merged 1 commit intoGeorge-Miao:masterfrom
xuanya0:master

Conversation

@xuanya0
Copy link
Contributor

@xuanya0 xuanya0 commented Feb 23, 2026

Qbit.get_torrent_peers() fails to unwrap()

called `Result::unwrap()` on an `Err` value: HttpError(reqwest::Error { kind: Decode, source: Error("invalid type: floating point `0.5333333333333333`, expected u64", line: 1, column: 474) })

peer info's relevance type should be f64 (qreal)

see: https://github.com/qbittorrent/qBittorrent/blob/master/src/base/bittorrent/peerinfo.h#L89

@George-Miao George-Miao changed the title Change Peer's relevance type from Option<u64> to Option<f64> fix: change Peer's relevance type from Option<u64> to Option<f64> Feb 24, 2026
@George-Miao George-Miao changed the title fix: change Peer's relevance type from Option<u64> to Option<f64> fix: change Peer's relevance type from Option<u64> to Option<f64> Feb 24, 2026
Copy link
Owner

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR :) LGTM

@George-Miao George-Miao merged commit 703f81b into George-Miao:master Feb 24, 2026
4 checks passed
@George-Miao
Copy link
Owner

v0.4.8 is released: https://crates.io/crates/qbit-rs/0.4.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants