Skip to content

Commit 3bc13dd

Browse files
committed
dev: cleanup http responses: announce
1 parent 5f6eed7 commit 3bc13dd

File tree

4 files changed

+259
-278
lines changed

4 files changed

+259
-278
lines changed

src/servers/http/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
//! 000000f0: 65 e
153153
//! ```
154154
//!
155-
//! Refer to the [`NonCompact`](crate::servers::http::v1::responses::announce::NonCompact)
155+
//! Refer to the [`Normal`](crate::servers::http::v1::responses::announce::Normal), i.e. `Non-Compact`
156156
//! response for more information about the response.
157157
//!
158158
//! **Sample compact response**

src/servers/http/v1/handlers/announce.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ fn build_response(announce_request: &Announce, announce_data: AnnounceData) -> R
120120
match &announce_request.compact {
121121
Some(compact) => match compact {
122122
Compact::Accepted => announce::Compact::from(announce_data).into_response(),
123-
Compact::NotAccepted => announce::NonCompact::from(announce_data).into_response(),
123+
Compact::NotAccepted => announce::Normal::from(announce_data).into_response(),
124124
},
125125
// Default response format non compact
126-
None => announce::NonCompact::from(announce_data).into_response(),
126+
None => announce::Normal::from(announce_data).into_response(),
127127
}
128128
}
129129

src/servers/http/v1/requests/announce.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl fmt::Display for Event {
180180
/// Depending on the value of this param, the tracker will return a different
181181
/// response:
182182
///
183-
/// - [`NonCompact`](crate::servers::http::v1::responses::announce::NonCompact) response.
183+
/// - [`Normal`](crate::servers::http::v1::responses::announce::Normal), i.e. a `non-compact` response.
184184
/// - [`Compact`](crate::servers::http::v1::responses::announce::Compact) response.
185185
///
186186
/// Refer to [BEP 23. Tracker Returns Compact Peer Lists](https://www.bittorrent.org/beps/bep_0023.html)

0 commit comments

Comments
 (0)