aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2017-04-19 16:37:34 -0700
committerZeyla Hellyer <[email protected]>2017-04-19 16:37:34 -0700
commit5bf6c2d2cf0491951eddb10ab2641d02d0e730a1 (patch)
treea15ea368b419607d6b38523eb18bc618b99fc884 /src
parentClippy lints (diff)
downloadserenity-5bf6c2d2cf0491951eddb10ab2641d02d0e730a1.tar.xz
serenity-5bf6c2d2cf0491951eddb10ab2641d02d0e730a1.zip
Fix ratelimiting on `Route::None` routes
Routes with a `Route::None` - to indicate not to keep a ratelimit bucket - would enter a loop on the route. To fix this, add an `else` block to the check for whether the route is _not_ `Route::None`, and return from it.
Diffstat (limited to 'src')
-rw-r--r--src/client/rest/ratelimiting.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/rest/ratelimiting.rs b/src/client/rest/ratelimiting.rs
index d336e37..cb88476 100644
--- a/src/client/rest/ratelimiting.rs
+++ b/src/client/rest/ratelimiting.rs
@@ -402,6 +402,8 @@ pub fn perform<'a, F>(route: Route, f: F) -> Result<Response>
if !redo.unwrap_or(true) {
return Ok(response);
}
+ } else {
+ return Ok(response);
}
}
}