Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implement CacheHttp for Arc<Http> #657

Merged
merged 4 commits into from
Jul 13, 2019

Conversation

Lakelezz
Copy link
Contributor

Allows to pass Arc<Http> without having to manually dereference.

@Lakelezz Lakelezz added enhancement An improvement to Serenity. cache Related to the `cache`-feature. http Related to the `http` module. labels Jul 13, 2019
src/http/mod.rs Outdated
impl CacheHttp for &Http {
#[cfg(feature = "http")]
fn http(&self) -> &Http { *self }
}

#[cfg(feature = "http")]
impl CacheHttp for Arc<Http> {
#[cfg(feature = "http")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this additional feature gate necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No :JUSTLOL:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:ram_heh:

@Lakelezz Lakelezz merged commit 1a209e8 into serenity-rs:current Jul 13, 2019
@Lakelezz Lakelezz deleted the impl-cachehttp-for-type branch July 13, 2019 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cache Related to the `cache`-feature. enhancement An improvement to Serenity. http Related to the `http` module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants