diff options
| author | Austin Hellyer <[email protected]> | 2016-12-16 21:17:48 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-12-16 21:17:48 -0800 |
| commit | 24168137ff7b1ec44d3ecdec0f516455fd3785a7 (patch) | |
| tree | d165326b175d64773ab8b297775e1f6496601459 /src | |
| parent | Modify examples to point to current repo (diff) | |
| download | serenity-24168137ff7b1ec44d3ecdec0f516455fd3785a7.tar.xz serenity-24168137ff7b1ec44d3ecdec0f516455fd3785a7.zip | |
Simplify gateway identify compression
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/gateway/prep.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/gateway/prep.rs b/src/client/gateway/prep.rs index ce105b3..844a558 100644 --- a/src/client/gateway/prep.rs +++ b/src/client/gateway/prep.rs @@ -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> { |