Skip to content

Commit b664a7c

Browse files
committed
temp-update
1 parent a6d8b17 commit b664a7c

55 files changed

Lines changed: 502 additions & 231 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 423 additions & 148 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/render-text-as-image/examples/test_render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::fs;
22

3-
use torrust_index_render_text_as_image::{render_text_to_png, RenderParams, Rgba};
3+
use torrust_index_render_text_as_image::{RenderParams, Rgba, render_text_to_png};
44

55
fn main() {
66
let params = RenderParams {

packages/render-text-as-image/src/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use crate::blend::blend_source_over;
77
use crate::encode::encode_rgba_png;
88
use crate::font::embedded_font;
99
use crate::layout::measure_text;
10-
use crate::types::{RenderError, RenderParams, MAX_TEXT_BYTES};
10+
use crate::types::{MAX_TEXT_BYTES, RenderError, RenderParams};
1111

1212
/// Saturating cast from `f32` to `u32`, clamped to `[0, u32::MAX]`.
1313
fn f32_to_u32_sat(v: f32) -> u32 {

packages/render-text-as-image/src/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! Crate-level tests for the public API.
22
33
use crate::types::MAX_TEXT_BYTES;
4-
use crate::{render_text_to_png, RenderError, RenderParams, Rgba};
4+
use crate::{RenderError, RenderParams, Rgba, render_text_to_png};
55

66
// --- Rendering tests ---
77

src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use tracing::info;
77
use crate::bootstrap::logging;
88
use crate::cache::image::manager::ImageCacheService;
99
use crate::common::AppData;
10-
use crate::config::validator::Validator;
1110
use crate::config::Configuration;
11+
use crate::config::validator::Validator;
1212
use crate::databases::database;
1313
use crate::services::authentication::{DbUserAuthenticationRepository, JsonWebToken, Service};
1414
use crate::services::authorization::{CasbinConfiguration, CasbinEnforcer};
@@ -21,9 +21,9 @@ use crate::services::torrent::{
2121
use crate::services::user::{self, DbBannedUserList, DbUserProfileRepository, DbUserRepository, Repository};
2222
use crate::services::{about, authorization, proxy, settings, torrent};
2323
use crate::tracker::statistics_importer::StatisticsImporter;
24+
use crate::web::api::Version;
2425
use crate::web::api::server::signals::Halted;
2526
use crate::web::api::server::v1::auth::Authentication;
26-
use crate::web::api::Version;
2727
use crate::{console, mailer, tracker, web};
2828

2929
pub struct Running {

src/bin/parse_torrent.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ fn main() -> io::Result<()> {
1313
let args: Vec<String> = env::args().collect();
1414
if args.len() != 2 {
1515
eprintln!("Usage: cargo run --bin parse_torrent <PATH_TO_TORRENT_FILE>");
16-
eprintln!("Example: cargo run --bin parse_torrent ./tests/fixtures/torrents/MC_GRID.zip-3cd18ff2d3eec881207dcc5ca5a2c3a2a3afe462.torrent");
16+
eprintln!(
17+
"Example: cargo run --bin parse_torrent ./tests/fixtures/torrents/MC_GRID.zip-3cd18ff2d3eec881207dcc5ca5a2c3a2a3afe462.torrent"
18+
);
1719
std::process::exit(1);
1820
}
1921

src/config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use std::sync::Arc;
77

88
use camino::Utf8PathBuf;
99
use derive_more::Display;
10-
use figment::providers::{Env, Format, Serialized, Toml};
1110
use figment::Figment;
11+
use figment::providers::{Env, Format, Serialized, Toml};
1212
use serde::{Deserialize, Serialize};
13-
use serde_with::{serde_as, NoneAsEmptyString};
13+
use serde_with::{NoneAsEmptyString, serde_as};
1414
use thiserror::Error;
1515
use tokio::sync::RwLock;
1616
use torrust_index_located_error::LocatedError;

src/config/v2/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ use self::net::Network;
2525
use self::tracker::{ApiToken, Tracker};
2626
use self::tracker_statistics_importer::TrackerStatisticsImporter;
2727
use self::website::Website;
28-
use super::validator::{ValidationError, Validator};
2928
use super::Metadata;
29+
use super::validator::{ValidationError, Validator};
3030

3131
/// The whole configuration for the index.
3232
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]

src/console/cronjobs/tracker_statistics_importer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use axum::extract::State;
1717
use axum::routing::{get, post};
1818
use axum::{Json, Router};
1919
use chrono::{DateTime, Utc};
20-
use serde_json::{json, Value};
20+
use serde_json::{Value, json};
2121
use text_colorizer::Colorize;
2222
use tokio::net::TcpListener;
2323
use tokio::task::JoinHandle;

src/databases/mysql.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use async_trait::async_trait;
55
use bittorrent_primitives::info_hash::InfoHash;
66
use chrono::{DateTime, NaiveDateTime, Utc};
77
use sqlx::mysql::{MySqlConnectOptions, MySqlPoolOptions};
8-
use sqlx::{query, query_as, Acquire, ConnectOptions, MySqlPool};
8+
use sqlx::{Acquire, ConnectOptions, MySqlPool, query, query_as};
99
use url::Url;
1010

11-
use super::database::{UsersFilters, UsersSorting, TABLES_TO_TRUNCATE};
11+
use super::database::{TABLES_TO_TRUNCATE, UsersFilters, UsersSorting};
1212
use crate::databases::database;
1313
use crate::databases::database::{Category, Database, Driver, Sorting, TorrentCompact};
1414
use crate::models::category::CategoryId;
@@ -21,7 +21,7 @@ use crate::models::torrent_tag::{TagId, TorrentTag};
2121
use crate::models::tracker_key::TrackerKey;
2222
use crate::models::user::{User, UserAuthentication, UserCompact, UserId, UserListing, UserProfile};
2323
use crate::services::torrent::{CanonicalInfoHashGroup, DbTorrentInfoHash};
24-
use crate::utils::clock::{self, datetime_now, DATETIME_FORMAT};
24+
use crate::utils::clock::{self, DATETIME_FORMAT, datetime_now};
2525
use crate::utils::hex::from_bytes;
2626

2727
pub struct Mysql {

0 commit comments

Comments
 (0)