Skip to content

Commit

Permalink
Simplify gateway identify compression
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Hellyer committed Dec 17, 2016
1 parent 8e4b57c commit 2416813
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/client/gateway/prep.rs
Expand Up @@ -77,14 +77,9 @@ pub fn identify(token: &str, shard_info: Option<[u8; 2]>) -> Value {
.build()
}

#[cfg(not(feature="debug"))]
#[inline(always)]
pub fn identify_compression(object: ObjectBuilder) -> ObjectBuilder {
object.insert("compression", true)
}

#[cfg(feature="debug")]
pub fn identify_compression(object: ObjectBuilder) -> ObjectBuilder {
object.insert("compression", false)
object.insert("compression", !cfg!(feature="debug"))
}

pub fn build_gateway_url(base: &str) -> Result<RequestUrl> {
Expand Down

0 comments on commit 2416813

Please sign in to comment.