diff options
| author | alex <[email protected]> | 2017-06-14 18:26:01 +0200 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-14 09:26:01 -0700 |
| commit | 32e07e4ac822d5cc1118f0db0fc92b549c1aaf81 (patch) | |
| tree | a4db15956faac92d544135de6885d64854a8b31d /src/http/ratelimiting.rs | |
| parent | Use HTTPS Connector with remaining HTTP functions (diff) | |
| download | serenity-32e07e4ac822d5cc1118f0db0fc92b549c1aaf81.tar.xz serenity-32e07e4ac822d5cc1118f0db0fc92b549c1aaf81.zip | |
Switch from #[doc(hidden)] to pub(crate)
Switch from using `#[doc(hidden)]` to hide some internal functions to
`pub(crate)`.
The library now requires rustc 1.18.
Diffstat (limited to 'src/http/ratelimiting.rs')
| -rw-r--r-- | src/http/ratelimiting.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/http/ratelimiting.rs b/src/http/ratelimiting.rs index d290dd0..dd56d6d 100644 --- a/src/http/ratelimiting.rs +++ b/src/http/ratelimiting.rs @@ -340,8 +340,7 @@ pub enum Route { None, } -#[doc(hidden)] -pub fn perform<'a, F>(route: Route, f: F) -> Result<Response> +pub(crate) fn perform<'a, F>(route: Route, f: F) -> Result<Response> where F: Fn() -> RequestBuilder<'a> { loop { // This will block if another thread already has the global @@ -435,8 +434,7 @@ pub struct RateLimit { } impl RateLimit { - #[doc(hidden)] - pub fn pre_hook(&mut self, route: &Route) { + pub(crate) fn pre_hook(&mut self, route: &Route) { if self.limit == 0 { return; } @@ -464,8 +462,7 @@ impl RateLimit { self.remaining -= 1; } - #[doc(hidden)] - pub fn post_hook(&mut self, response: &Response, route: &Route) -> Result<bool> { + pub(crate) fn post_hook(&mut self, response: &Response, route: &Route) -> Result<bool> { if let Some(limit) = parse_header(&response.headers, "x-ratelimit-limit")? { self.limit = limit; } |