Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Don't execute slow doc tests #1141

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl Key {

/// Error returned when a key cannot be parsed from a string.
///
/// ```rust,no_run
/// ```text
/// use torrust_tracker::core::auth::Key;
/// use std::str::FromStr;
///
Expand Down
4 changes: 2 additions & 2 deletions src/core/databases/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub enum Driver {
///
/// Example for `SQLite3`:
///
/// ```rust,no_run
/// ```text
/// use torrust_tracker::core::databases;
/// use torrust_tracker::core::databases::driver::Driver;
///
Expand All @@ -40,7 +40,7 @@ pub enum Driver {
///
/// Example for `MySQL`:
///
/// ```rust,no_run
/// ```text
/// use torrust_tracker::core::databases;
/// use torrust_tracker::core::databases::driver::Driver;
///
Expand Down
8 changes: 4 additions & 4 deletions src/servers/http/v1/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Query {
/// It return `Some(value)` for a URL query param if the param with the
/// input `name` exists. For example:
///
/// ```rust
/// ```text
/// use torrust_tracker::servers::http::v1::query::Query;
///
/// let raw_query = "param1=value1&param2=value2";
Expand All @@ -43,7 +43,7 @@ impl Query {
///
/// It returns only the first param value even if it has multiple values:
///
/// ```rust
/// ```text
/// use torrust_tracker::servers::http::v1::query::Query;
///
/// let raw_query = "param1=value1&param1=value2";
Expand All @@ -59,7 +59,7 @@ impl Query {

/// Returns all the param values as a vector.
///
/// ```rust
/// ```text
/// use torrust_tracker::servers::http::v1::query::Query;
///
/// let query = "param1=value1&param1=value2".parse::<Query>().unwrap();
Expand All @@ -72,7 +72,7 @@ impl Query {
///
/// Returns all the param values as a vector even if it has only one value.
///
/// ```rust
/// ```text
/// use torrust_tracker::servers::http::v1::query::Query;
///
/// let query = "param1=value1".parse::<Query>().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/servers/http/v1/requests/announce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const NUMWANT: &str = "numwant";
/// The `Announce` request. Fields use the domain types after parsing the
/// query params of the request.
///
/// ```rust
/// ```text
/// use aquatic_udp_protocol::{NumberOfBytes, PeerId};
/// use torrust_tracker::servers::http::v1::requests::announce::{Announce, Compact, Event};
/// use bittorrent_primitives::info_hash::InfoHash;
Expand Down
4 changes: 2 additions & 2 deletions src/servers/http/v1/responses/announce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl Into<Vec<u8>> for Compact {

/// A [`NormalPeer`], for the [`Normal`] form.
///
/// ```rust
/// ```text
/// use std::net::{IpAddr, Ipv4Addr};
/// use torrust_tracker::servers::http::v1::responses::announce::{Normal, NormalPeer};
///
Expand Down Expand Up @@ -204,7 +204,7 @@ impl From<&NormalPeer> for BencodeMut<'_> {
/// A part from reducing the size of the response, this format does not contain
/// the peer's ID.
///
/// ```rust
/// ```text
/// use std::net::{IpAddr, Ipv4Addr};
/// use torrust_tracker::servers::http::v1::responses::announce::{Compact, CompactPeer, CompactPeerData};
///
Expand Down
2 changes: 1 addition & 1 deletion src/servers/http/v1/responses/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct Error {
impl Error {
/// Returns the bencoded representation of the `Error` struct.
///
/// ```rust
/// ```text
/// use torrust_tracker::servers::http::v1::responses::error::Error;
///
/// let err = Error {
Expand Down
2 changes: 1 addition & 1 deletion src/servers/http/v1/responses/scrape.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::core::ScrapeData;

/// The `Scrape` response for the HTTP tracker.
///
/// ```rust
/// ```text
/// use torrust_tracker::servers::http::v1::responses::scrape::Bencoded;
/// use bittorrent_primitives::info_hash::InfoHash;
/// use torrust_tracker_primitives::swarm_metadata::SwarmMetadata;
Expand Down
4 changes: 2 additions & 2 deletions src/servers/http/v1/services/peer_ip_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub enum PeerIpResolutionError {
///
/// With the tracker running on reverse proxy mode:
///
/// ```rust
/// ```text
/// use std::net::IpAddr;
/// use std::str::FromStr;
///
Expand All @@ -81,7 +81,7 @@ pub enum PeerIpResolutionError {
///
/// With the tracker non running on reverse proxy mode:
///
/// ```rust
/// ```text
/// use std::net::IpAddr;
/// use std::str::FromStr;
///
Expand Down
Loading