Skip to content

Commit

Permalink
Merge pull request #1887 from scpwiki/unused-import
Browse files Browse the repository at this point in the history
Remove unused import warnings from deepwell
  • Loading branch information
emmiegit authored Apr 19, 2024
2 parents cd395cc + 7e3b88c commit 64497a9
Show file tree
Hide file tree
Showing 36 changed files with 42 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deepwell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
name: Executable
runs-on: ubuntu-latest
env:
RUSTFLAGS: -A unused -D warnings
RUSTFLAGS: -D warnings
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
name: Coverage
runs-on: ubuntu-latest
env:
RUSTFLAGS: -A unused -D warnings
RUSTFLAGS: -D warnings

steps:
- name: Checkout
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
name: Lint
runs-on: ubuntu-latest
env:
RUSTFLAGS: -A unused -D warnings
RUSTFLAGS: -D warnings
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/endpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
//! instead live in `services`. Endpoint definitions should ideally be wrappers
//! around service calls, or possibly perform modest data conversion for HTTP.

#[allow(unused_imports)]
mod prelude {
pub use crate::api::ServerState;
pub use crate::services::{
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ mod build {

use once_cell::sync::Lazy;

#[allow(unused_imports)]
pub use self::build::{
BUILT_TIME_UTC, GIT_COMMIT_HASH, NUM_JOBS, PKG_AUTHORS, PKG_DESCRIPTION, PKG_LICENSE,
PKG_NAME, PKG_REPOSITORY, PKG_VERSION, RUSTC_VERSION, TARGET,
Expand Down
2 changes: 2 additions & 0 deletions deepwell/src/locales/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#![allow(unused_imports)]

mod arguments;
mod error;
mod fallback;
Expand Down
2 changes: 2 additions & 0 deletions deepwell/src/models/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.14

#![allow(unused_imports)]

pub use super::alias::Entity as Alias;
pub use super::file::Entity as File;
pub use super::file_revision::Entity as FileRevision;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/alias/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/authentication/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/blob/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
//! Method implementations should instead work with the relevant concept
//! service instead, for instance the `FileService`.

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/category/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/domain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/email/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/file_revision/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/filter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
//! registered, where a user site filter would prevent the user from
//! joining.

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::matcher::{FilterMatcher, FilterSummary};
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/import/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/job/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
//! At present we do not use a separate service which stores jobs durably. This
//! can mean that if this DEEPWELL node fails, the queued jobs will not be run.

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::service::{
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/link/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
//! types, and tables make it hard to modularize. Instead, the logic is hopefully
//! clear enough to be acceptable when repeated over a few slightly distinct cases.

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/message_report/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/mfa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
2 changes: 2 additions & 0 deletions deepwell/src/services/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#![allow(unused_imports)]

//! The "services" module, providing low-level logical operations.
//!
//! Each service is named for a particular object or concept, and
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/page/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/page_query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/page_revision/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/parent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/relation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//! * `site` / `member` / `user` &mdash; User is a site member
//! * `user` / `block` / `user` &mdash; User has blocked another user

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/score/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/site/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/special_page/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
//! This encompasses per-site configurable templates such as `_404`,
//! which display custom "this page does not exist" content.

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/user/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/user_bot_owner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::options::PageOptions;
Expand Down
1 change: 1 addition & 0 deletions deepwell/src/services/vote/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#[allow(unused_imports)]
mod prelude {
pub use super::super::prelude::*;
pub use super::structs::*;
Expand Down
2 changes: 2 additions & 0 deletions deepwell/src/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#![allow(unused_imports)]

mod bytes;
mod connection_type;
mod fetch_direction;
Expand Down

0 comments on commit 64497a9

Please sign in to comment.