Skip to content

Commit 59a3d4d

Browse files
committed
controllers/helpers/pagination: Add commas to variants in seek! macro rules
1 parent 526e785 commit 59a3d4d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/controllers/helpers/pagination.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ macro_rules! seek {
437437
(
438438
$vis:vis enum $name:ident {
439439
$(
440-
$variant:ident $fields:tt
440+
$variant:ident $fields:tt,
441441
)*
442442
}
443443
) => {
@@ -610,9 +610,9 @@ mod tests {
610610
use chrono::naive::serde::ts_microseconds;
611611
seek! {
612612
pub(super) enum Seek {
613-
Id{id: i32}
614-
New{#[serde(with="ts_microseconds")] dt: chrono::NaiveDateTime, id: i32}
615-
RecentDownloads{ downloads: Option<i64>, id: i32 }
613+
Id{id: i32},
614+
New{#[serde(with="ts_microseconds")] dt: chrono::NaiveDateTime, id: i32},
615+
RecentDownloads{ downloads: Option<i64>, id: i32 },
616616
}
617617
}
618618
}

src/controllers/krate/search.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,13 +560,13 @@ mod seek {
560560

561561
seek! {
562562
pub enum Seek {
563-
Name{ id: i32 }
564-
New{#[serde(with="ts_microseconds")] created_at: chrono::NaiveDateTime, id: i32}
565-
RecentUpdates{#[serde(with="ts_microseconds")] updated_at: chrono::NaiveDateTime, id: i32}
566-
RecentDownloads{recent_downloads: Option<i64>, id: i32}
567-
Downloads{downloads: i64, id: i32}
568-
Query{exact_match: bool, id: i32}
569-
Relevance{exact_match: bool, rank: f32, id: i32}
563+
Name{ id: i32 },
564+
New{#[serde(with="ts_microseconds")] created_at: chrono::NaiveDateTime, id: i32},
565+
RecentUpdates{#[serde(with="ts_microseconds")] updated_at: chrono::NaiveDateTime, id: i32},
566+
RecentDownloads{recent_downloads: Option<i64>, id: i32},
567+
Downloads{downloads: i64, id: i32},
568+
Query{exact_match: bool, id: i32},
569+
Relevance{exact_match: bool, rank: f32, id: i32},
570570
}
571571
}
572572

src/controllers/krate/versions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ mod seek {
236236
// doesn't include field names.
237237
seek! {
238238
pub enum Seek {
239-
Semver{id: i32}
240-
Date{#[serde(with="ts_microseconds")] created_at: chrono::NaiveDateTime, id: i32}
239+
Semver{id: i32},
240+
Date{#[serde(with="ts_microseconds")] created_at: chrono::NaiveDateTime, id: i32},
241241
}
242242
}
243243

0 commit comments

Comments
 (0)