Skip to content

Commit

Permalink
fixed timeout methods not being feature gated (#519)
Browse files Browse the repository at this point in the history
* fixed timeout methods not being feature gated

* removed the `timeout` feature gate as requested

* Revert "removed the `timeout` feature gate as requested"

This reverts commit 6024850.
  • Loading branch information
CommanderStorm committed Jan 15, 2024
1 parent f11fb75 commit 340440a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,18 +486,21 @@ impl OctocrabBuilder<NoSvc, DefaultOctocrabBuilderConfig, NoAuth, NotLayerReady>
}

/// Set the connect timeout.
#[cfg(feature = "timeout")]
pub fn set_connect_timeout(mut self, timeout: Option<Duration>) -> Self {
self.config.connect_timeout = timeout;
self
}

/// Set the read timeout.
#[cfg(feature = "timeout")]
pub fn set_read_timeout(mut self, timeout: Option<Duration>) -> Self {
self.config.read_timeout = timeout;
self
}

/// Set the write timeout.
#[cfg(feature = "timeout")]
pub fn set_write_timeout(mut self, timeout: Option<Duration>) -> Self {
self.config.write_timeout = timeout;
self
Expand Down

0 comments on commit 340440a

Please sign in to comment.