From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BBDA71FA1A for ; Tue, 26 Oct 2021 10:35:58 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 8/9] lei rm|tag: drop redundant mbox+net callbacks Date: Tue, 26 Oct 2021 10:35:56 +0000 Message-Id: <20211026103557.2738-9-e@80x24.org> In-Reply-To: <20211026103557.2738-1-e@80x24.org> References: <20211026103557.2738-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: These are supplied by the base LeiInput class --- lib/PublicInbox/LeiRm.pm | 10 ---------- lib/PublicInbox/LeiTag.pm | 11 ----------- 2 files changed, 21 deletions(-) diff --git a/lib/PublicInbox/LeiRm.pm b/lib/PublicInbox/LeiRm.pm index 97b1c5c15dc4..524c178e3b47 100644 --- a/lib/PublicInbox/LeiRm.pm +++ b/lib/PublicInbox/LeiRm.pm @@ -13,16 +13,6 @@ sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh $self->{lei}->{sto}->wq_do('remove_eml', $eml); } -sub input_mbox_cb { # MboxReader callback - my ($eml, $self) = @_; - input_eml_cb($self, $eml); -} - -sub input_net_cb { # callback for ->imap_each, ->nntp_each - my (undef, undef, $kw, $eml, $self) = @_; # @_[0,1]: url + uid ignored - input_eml_cb($self, $eml); -} - sub input_maildir_cb { my (undef, $kw, $eml, $self) = @_; # $_[0] $filename ignored input_eml_cb($self, $eml); diff --git a/lib/PublicInbox/LeiTag.pm b/lib/PublicInbox/LeiTag.pm index 77654d1a2f22..d64a9f86e05a 100644 --- a/lib/PublicInbox/LeiTag.pm +++ b/lib/PublicInbox/LeiTag.pm @@ -19,23 +19,12 @@ sub input_eml_cb { # used by PublicInbox::LeiInput::input_fh } } -sub input_mbox_cb { - my ($eml, $self) = @_; - $eml->header_set($_) for (qw(X-Status Status)); - input_eml_cb($self, $eml); -} - sub pmdir_cb { # called via wq_io_do from LeiPmdir->each_mdir_fn my ($self, $f) = @_; my $eml = eml_from_path($f) or return; input_eml_cb($self, $eml); } -sub input_net_cb { # imap_each, nntp_each cb - my ($url, $uid, $kw, $eml, $self) = @_; - input_eml_cb($self, $eml); -} - sub lei_tag { # the "lei tag" method my ($lei, @argv) = @_; my $sto = $lei->_lei_store(1);