Skip to content

Commit

Permalink
Remove useless lifetime from ClientBuilder (#1566)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangalio authored and arqunis committed Mar 15, 2022
1 parent 97474be commit e6039c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/client/mod.rs
Expand Up @@ -75,10 +75,10 @@ pub use crate::CacheAndHttp;

/// A builder implementing [`Future`] building a [`Client`] to interact with Discord.
#[cfg(feature = "gateway")]
pub struct ClientBuilder<'a> {
pub struct ClientBuilder {
data: Option<TypeMap>,
http: Http,
fut: Option<BoxFuture<'a, Result<Client>>>,
fut: Option<BoxFuture<'static, Result<Client>>>,
intents: GatewayIntents,
#[cfg(feature = "unstable_discord_api")]
application_id: Option<ApplicationId>,
Expand All @@ -96,7 +96,7 @@ pub struct ClientBuilder<'a> {
}

#[cfg(feature = "gateway")]
impl<'a> ClientBuilder<'a> {
impl ClientBuilder {
fn _new(http: Http) -> Self {
Self {
data: Some(TypeMap::new()),
Expand Down Expand Up @@ -393,7 +393,7 @@ impl<'a> ClientBuilder<'a> {
}

#[cfg(feature = "gateway")]
impl<'a> Future for ClientBuilder<'a> {
impl Future for ClientBuilder {
type Output = Result<Client>;

#[allow(clippy::unwrap_used)] // Allowing unwrap because all should be Some() by this point
Expand Down Expand Up @@ -696,7 +696,7 @@ pub struct Client {
}

impl Client {
pub fn builder<'a>(token: impl AsRef<str>) -> ClientBuilder<'a> {
pub fn builder(token: impl AsRef<str>) -> ClientBuilder {
ClientBuilder::new(token)
}

Expand Down

0 comments on commit e6039c4

Please sign in to comment.