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/mod.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/mod.rs')
| -rw-r--r-- | src/http/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 90869d6..b8a40ca 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -80,8 +80,8 @@ lazy_static! { /// Sets the token to be used across all requests which require authentication. /// -/// This is really only for internal use, and if you are reading this as a user, -/// you should _not_ use this yourself. +/// This is intended for internal use! The only exception are webhooks. +/// But really, please don't use this. #[doc(hidden)] pub fn set_token(token: &str) { TOKEN.lock().unwrap().clone_from(&token.to_owned()); @@ -1583,8 +1583,7 @@ fn request<'a, F>(route: Route, f: F) -> Result<HyperResponse> } } -#[doc(hidden)] -pub fn retry<'a, F>(f: F) -> HyperResult<HyperResponse> +pub(crate) fn retry<'a, F>(f: F) -> HyperResult<HyperResponse> where F: Fn() -> RequestBuilder<'a> { let req = || f() .header(header::UserAgent(constants::USER_AGENT.to_owned())) |