Skip to content

Commit 07f8939

Browse files
acatangiuandreeaflorescu
authored andcommitted
rename TokenBucket in api_server crate to TokenBucketDescription
Renamed for crate consistency. Signed-off-by: Adrian Catangiu <[email protected]>
1 parent f9e04dc commit 07f8939

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

api_server/src/request/sync/rate_limiter.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ use fc_util::ratelimiter::RateLimiter;
44

55
// This struct represents the strongly typed equivalent of the json body for TokenBucket
66
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
7-
pub struct TokenBucket {
7+
pub struct TokenBucketDescription {
88
pub size: u64,
99
pub refill_time: u64,
1010
}
1111

12-
impl Default for TokenBucket {
12+
impl Default for TokenBucketDescription {
1313
fn default() -> Self {
14-
TokenBucket {
14+
TokenBucketDescription {
1515
size: 0,
1616
refill_time: 0,
1717
}
@@ -21,8 +21,8 @@ impl Default for TokenBucket {
2121
// This struct represents the strongly typed equivalent of the json body for RateLimiter
2222
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
2323
pub struct RateLimiterDescription {
24-
pub bandwidth: TokenBucket,
25-
pub ops: TokenBucket,
24+
pub bandwidth: TokenBucketDescription,
25+
pub ops: TokenBucketDescription,
2626
}
2727

2828
// TryFrom trait is sadly marked unstable, so make our own
@@ -52,7 +52,7 @@ mod tests {
5252

5353
#[test]
5454
fn test_token_bucket_derives() {
55-
let tb = TokenBucket {
55+
let tb = TokenBucketDescription {
5656
size: 0,
5757
refill_time: 0,
5858
};

0 commit comments

Comments
 (0)