Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove usage of async-trait macro #88

Merged
merged 2 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dbreps2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ edition = "2021"

[dependencies]
anyhow = "1.0"
async-trait = "0.1.50"
clap = { version = "4.3.0", features = ["derive"] }
dirs = "5.0.1"
env_logger = "0.10.0"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,4 @@ pub use {
untaggedunrefblps::UntaggedUnrefBLPs, unusednonfree::UnusedNonFree,
unusedtemplates::UnusedTemplates,
unusedtemplatesfiltered::UnusedTemplatesFiltered, usercats::UserCats,
webhostpages::WebhostPages,
};
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/boteditcount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ pub struct Row {

pub struct BotEditCount {}

#[async_trait::async_trait]
impl Report<Row> for BotEditCount {
fn title(&self) -> &'static str {
"<boteditcount>"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/brokenwikiprojtemps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct BrokenWikiProjTemps {}

#[async_trait::async_trait]
impl Report<Row> for BrokenWikiProjTemps {
fn title(&self) -> &'static str {
"Broken WikiProject templates"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/conflictedfiles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct ConflictedFiles {}

#[async_trait::async_trait]
impl Report<Row> for ConflictedFiles {
fn title(&self) -> &'static str {
"Files with conflicting categorization"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/editcount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ pub struct Row {

pub struct EditCount {}

#[async_trait::async_trait]
impl Report<Row> for EditCount {
fn title(&self) -> &'static str {
"<placeholder>"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/emptycats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct EmptyCats {}

#[async_trait::async_trait]
impl Report<Row> for EmptyCats {
fn title(&self) -> &'static str {
"Empty categories"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/featuredbysize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub struct FeaturedBySize {
pub(crate) bot: Bot,
}

#[async_trait::async_trait]
impl Report<Row> for FeaturedBySize {
fn title(&self) -> &'static str {
"Featured articles by size"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/linkedmiscapitalizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct LinkedMiscapitalizations {}

#[async_trait::async_trait]
impl Report<Row> for LinkedMiscapitalizations {
fn title(&self) -> &'static str {
"Linked miscapitalizations"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/linkedmisspellings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct LinkedMisspellings {}

#[async_trait::async_trait]
impl Report<Row> for LinkedMisspellings {
fn title(&self) -> &'static str {
"Linked misspellings"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/longstubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct LongStubs {}

#[async_trait::async_trait]
impl Report<Row> for LongStubs {
fn title(&self) -> &'static str {
"Long stubs"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/lotnonfree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Row {

pub struct LotNonFree {}

#[async_trait::async_trait]
impl Report<Row> for LotNonFree {
fn title(&self) -> &'static str {
"Pages containing an unusually high number of non-free files"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/newprojects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Row {

pub struct NewProjects {}

#[async_trait::async_trait]
impl Report<Row> for NewProjects {
fn title(&self) -> &'static str {
"New WikiProjects"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/olddeletiondiscussions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub struct Row {

pub struct OldDeletionDiscussions {}

#[async_trait::async_trait]
impl Report<Row> for OldDeletionDiscussions {
fn title(&self) -> &'static str {
"Old deletion discussions"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/orphanedafds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct OrphanedAfds {}

#[async_trait::async_trait]
impl Report<Row> for OrphanedAfds {
fn title(&self) -> &'static str {
"Orphaned article deletion discussions"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/orphanedsubtalks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct OrphanedSubTalks {}

#[async_trait::async_trait]
impl Report<Row> for OrphanedSubTalks {
fn title(&self) -> &'static str {
"Orphaned talk subpages"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/overusednonfree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct OverusedNonFree {}

#[async_trait::async_trait]
impl Report<Row> for OverusedNonFree {
fn title(&self) -> &'static str {
"Overused non-free files"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/polltemps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct PollTemps {}

#[async_trait::async_trait]
impl Report<Row> for PollTemps {
fn title(&self) -> &'static str {
"Template categories containing articles"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/potenshbdps1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct Potenshbdps1 {}

#[async_trait::async_trait]
impl Report<Row> for Potenshbdps1 {
fn title(&self) -> &'static str {
"Potential biographies of dead people (1)"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/potenshbdps3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct Potenshbdps3 {}

#[async_trait::async_trait]
impl Report<Row> for Potenshbdps3 {
fn title(&self) -> &'static str {
"Potential biographies of dead people (3)"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/potenshblps1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct Potenshblps1 {}

#[async_trait::async_trait]
impl Report<Row> for Potenshblps1 {
fn title(&self) -> &'static str {
"Potential biographies of living people (1)"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/potenshblps2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Row {

pub struct Potenshblps2 {}

#[async_trait::async_trait]
impl Report<Row> for Potenshblps2 {
fn title(&self) -> &'static str {
"Potential biographies of living people (2)"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/potenshblps3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct Potenshblps3 {}

#[async_trait::async_trait]
impl Report<Row> for Potenshblps3 {
fn title(&self) -> &'static str {
"Potential biographies of living people (3)"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/projectchanges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub struct Row {

pub struct ProjectChanges {}

#[async_trait::async_trait]
impl Report<Row> for ProjectChanges {
fn title(&self) -> &'static str {
"WikiProjects by changes"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/shortestbios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct ShortestBios {}

#[async_trait::async_trait]
impl Report<Row> for ShortestBios {
fn title(&self) -> &'static str {
"Shortest biographies of living people"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/stickyprodblps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Row {

pub struct StickyProdBLPs {}

#[async_trait::async_trait]
impl Report<Row> for StickyProdBLPs {
fn title(&self) -> &'static str {
"Biographies of living people possibly eligible for deletion"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/templatedisambigs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Row {

pub struct TemplateDisambigs {}

#[async_trait::async_trait]
impl Report<Row> for TemplateDisambigs {
fn title(&self) -> &'static str {
"Templates containing links to disambiguation pages"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/templatesnonfree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct TemplatesNonFree {}

#[async_trait::async_trait]
impl Report<Row> for TemplatesNonFree {
fn title(&self) -> &'static str {
"Templates containing non-free files"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/unbelievablelifespans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub struct Row {

pub struct UnbelievableLifeSpans {}

#[async_trait::async_trait]
impl Report<Row> for UnbelievableLifeSpans {
fn title(&self) -> &'static str {
"Unbelievable life spans"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/uncatunrefblps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct UncatUnrefBLPs {}

#[async_trait::async_trait]
impl Report<Row> for UncatUnrefBLPs {
fn title(&self) -> &'static str {
"Uncategorized and unreferenced biographies of living people"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/unsourcedblps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct UnsourcedBLPs {}

#[async_trait::async_trait]
impl Report<Row> for UnsourcedBLPs {
fn title(&self) -> &'static str {
"Biographies of living people containing unsourced statements"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/untaggedblps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct UntaggedBLPs {}

#[async_trait::async_trait]
impl Report<Row> for UntaggedBLPs {
fn title(&self) -> &'static str {
"Untagged biographies of living people"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/untaggedstubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Row {

pub struct UntaggedStubs {}

#[async_trait::async_trait]
impl Report<Row> for UntaggedStubs {
fn title(&self) -> &'static str {
"Untagged stubs"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/untaggedunrefblps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Row {

pub struct UntaggedUnrefBLPs {}

#[async_trait::async_trait]
impl Report<Row> for UntaggedUnrefBLPs {
fn title(&self) -> &'static str {
"Untagged and unreferenced biographies of living people"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/unusednonfree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct UnusedNonFree {}

#[async_trait::async_trait]
impl Report<Row> for UnusedNonFree {
fn title(&self) -> &'static str {
"Unused non-free files"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/unusedtemplates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ WHERE
}
}

#[async_trait::async_trait]
impl Report<Row> for UnusedTemplates {
fn title(&self) -> &'static str {
"Unused templates"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/unusedtemplatesfiltered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ WHERE
}
}

#[async_trait::async_trait]
impl Report<Row> for UnusedTemplatesFiltered {
fn title(&self) -> &'static str {
"Unused templates (filtered)"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/usercats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub struct Row {

pub struct UserCats {}

#[async_trait::async_trait]
impl Report<Row> for UserCats {
fn title(&self) -> &'static str {
"User categories"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/enwiki/webhostpages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub struct Row {

pub struct WebhostPages {}

#[async_trait::async_trait]
impl Report<Row> for WebhostPages {
fn title(&self) -> &'static str {
"Potential U5s"
Expand Down
5 changes: 2 additions & 3 deletions dbreps2/src/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ pub use {
dupefilenames::DupeFileNames, excessiveips::ExcessiveIps,
excessiveusers::ExcessiveUsers, indeffullredirects::IndefFullRedirects,
indefips::IndefIPs, linkedemailsinarticles::LinkedEmailsInArticles,
linkedredlinkedcats::LinkedRedlinkedCats, oldeditors::OldEditors,
ownerlessuserpages::Ownerlessuserpages, pollcats::Pollcats,
uncatcats::UncatCats, uncattemps::UncatTemps,
oldeditors::OldEditors, ownerlessuserpages::Ownerlessuserpages,
pollcats::Pollcats, uncatcats::UncatCats, uncattemps::UncatTemps,
userarticlestreaks::UserArticleStreaks,
userlinksinarticles::UserLinksInArticles, userstreaks::UserStreaks,
};
1 change: 0 additions & 1 deletion dbreps2/src/general/articlesmostredirects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub struct Row {

pub struct ArticlesMostRedirects {}

#[async_trait::async_trait]
impl Report<Row> for ArticlesMostRedirects {
fn title(&self) -> &'static str {
"Articles with the most redirects"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/general/blankpages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ pub struct Row {

pub struct BlankPages;

#[async_trait::async_trait]
impl Report<Row> for BlankPages {
fn title(&self) -> &'static str {
"Blank single-author pages"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/general/dupefilenames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ pub struct Row {
orig_names_str: String,
}

#[async_trait::async_trait]
impl Report<Row> for DupeFileNames {
fn title(&self) -> &'static str {
"Largely duplicative file names"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/general/excessiveips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub struct Row {

pub struct ExcessiveIps {}

#[async_trait::async_trait]
impl Report<Row> for ExcessiveIps {
fn title(&self) -> &'static str {
"Unusually long IP blocks"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/general/excessiveusers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub struct Row {

pub struct ExcessiveUsers {}

#[async_trait::async_trait]
impl Report<Row> for ExcessiveUsers {
fn title(&self) -> &'static str {
"Unusually long user blocks"
Expand Down
1 change: 0 additions & 1 deletion dbreps2/src/general/indeffullredirects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub struct Row {

pub struct IndefFullRedirects {}

#[async_trait::async_trait]
impl Report<Row> for IndefFullRedirects {
fn title(&self) -> &'static str {
"Indefinitely fully protected redirects"
Expand Down
Loading
Loading