Skip to content

Commit 324fac7

Browse files
committed
fix: [#453] cargo fmt --check for nigthly toolchain
1 parent 935facb commit 324fac7

File tree

5 files changed

+18
-27
lines changed

5 files changed

+18
-27
lines changed

src/console/commands/seeder/api.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
use log::debug;
2+
use thiserror::Error;
3+
14
use crate::web::api::client::v1::client::Client;
25
use crate::web::api::client::v1::contexts::category::forms::AddCategoryForm;
36
use crate::web::api::client::v1::contexts::category::responses::{ListItem, ListResponse};
@@ -7,9 +10,6 @@ use crate::web::api::client::v1::contexts::user::forms::LoginForm;
710
use crate::web::api::client::v1::contexts::user::responses::{LoggedInUserData, SuccessfulLoginResponse};
811
use crate::web::api::client::v1::responses::TextResponse;
912

10-
use log::debug;
11-
use thiserror::Error;
12-
1313
#[derive(Error, Debug)]
1414
pub enum Error {
1515
#[error("Torrent with the same info-hash already exist in the database")]

src/console/commands/seeder/app.rs

+10-20
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,24 @@
1414
//!
1515
//! That command would upload 1000 random torrents to the Index using the user
1616
//! account admin with password 123456 and waiting 1 second between uploads.
17-
use std::{thread::sleep, time::Duration};
17+
use std::thread::sleep;
18+
use std::time::Duration;
1819

1920
use anyhow::Context;
2021
use clap::Parser;
2122
use log::{debug, info, LevelFilter};
2223
use text_colorizer::Colorize;
2324
use uuid::Uuid;
2425

25-
use crate::{
26-
console::commands::seeder::{
27-
api::{login, upload_torrent},
28-
logging,
29-
},
30-
services::torrent_file::generate_random_torrent,
31-
utils::parse_torrent,
32-
web::api::client::v1::{
33-
client::Client,
34-
contexts::{
35-
torrent::{
36-
forms::{BinaryFile, UploadTorrentMultipartForm},
37-
responses::UploadedTorrent,
38-
},
39-
user::responses::LoggedInUserData,
40-
},
41-
},
42-
};
43-
4426
use super::api::Error;
27+
use crate::console::commands::seeder::api::{login, upload_torrent};
28+
use crate::console::commands::seeder::logging;
29+
use crate::services::torrent_file::generate_random_torrent;
30+
use crate::utils::parse_torrent;
31+
use crate::web::api::client::v1::client::Client;
32+
use crate::web::api::client::v1::contexts::torrent::forms::{BinaryFile, UploadTorrentMultipartForm};
33+
use crate::web::api::client::v1::contexts::torrent::responses::UploadedTorrent;
34+
use crate::web::api::client::v1::contexts::user::responses::LoggedInUserData;
4535

4636
#[derive(Parser, Debug)]
4737
#[clap(author, version, about, long_about = None)]

src/console/commands/seeder/logging.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use log::{debug, LevelFilter};
22

33
/// # Panics
4-
///
5-
///
4+
///
5+
///
66
pub fn setup(level: LevelFilter) {
77
if let Err(_err) = fern::Dispatch::new()
88
.format(|out, message, record| {

src/web/api/client/v1/contexts/settings/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
pub mod responses;
22

3+
use serde::{Deserialize, Serialize};
4+
35
use crate::config::{
46
Api as DomainApi, Auth as DomainAuth, Database as DomainDatabase, ImageCache as DomainImageCache, Mail as DomainMail,
57
Network as DomainNetwork, TorrustIndex as DomainSettings, Tracker as DomainTracker,
68
TrackerStatisticsImporter as DomainTrackerStatisticsImporter, Website as DomainWebsite,
79
};
8-
use serde::{Deserialize, Serialize};
910

1011
#[derive(Deserialize, Serialize, PartialEq, Debug, Clone)]
1112
pub struct Settings {

src/web/api/server/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use std::sync::Arc;
66
use futures::Future;
77
use log::info;
88
use tokio::sync::oneshot::{self, Sender};
9+
use v1::routes::router;
910

1011
use super::{Running, ServerStartedMessage};
1112
use crate::common::AppData;
12-
use v1::routes::router;
1313

1414
/// Starts the API server.
1515
///

0 commit comments

Comments
 (0)