From 18b8afd54cce5f83ddc89abaa2a0ee05686331ce Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Mon, 19 Jan 2026 21:19:10 -0300 Subject: [PATCH] O --- Cargo.toml | 19 +++---------------- src/core/shared/admin.rs | 1 + src/email/mod.rs | 3 +++ src/monitoring/real_time.rs | 2 +- src/security/command_guard.rs | 2 +- src/settings/mod.rs | 3 +++ 6 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c3c068109..e940fd49f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -109,7 +109,7 @@ base64 = "0.22" bytes = "1.8" chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } color-eyre = "0.6.5" -diesel = { version = "2.1", features = ["postgres", "uuid", "chrono", "serde_json", "r2d2", "numeric", "32-column-tables"] } +diesel = { version = "2.1", features = ["postgres", "uuid", "chrono", "serde_json", "r2d2", "numeric"] } bigdecimal = { version = "0.4", default-features = false } diesel_migrations = "2.1.0" dirs = "5.0" @@ -133,7 +133,7 @@ serde_json = "1.0" toml = "0.8" sha2 = "0.10.9" sha1 = "0.10.6" -tokio = { version = "1.41", default-features = false, features = ["rt", "sync", "time", "macros", "net", "rt-multi-thread", "process"] } +tokio = { version = "1.41", default-features = false, features = ["full", "process", "process"] } tokio-stream = "0.1" tower = "0.4" tower-http = { version = "0.5", default-features = false, features = ["cors", "fs", "trace"] } @@ -179,7 +179,7 @@ spreadsheet-ods = { version = "1.0", optional = true } aws-config = { version = "1.8.8", default-features = false, optional = true } aws-sdk-s3 = { version = "1.109.0", default-features = false, optional = true } pdf-extract = { version = "0.10.0", optional = true } -quick-xml = { version = "0.37", optional=true, default-features = false, features = ["serialize"] } +quick-xml = { version = "0.37", optional=true, features = ["serialize"] } flate2 = { version = "1.0", optional = false } zip = { version = "2.2", optional = false } tar = { version = "0.4", optional = false } @@ -251,16 +251,3 @@ http-body-util = "0.1.3" mockito = "1.7.0" tempfile = "3" -[profile.dev] -opt-level = 1 -split-debuginfo = "unpacked" -incremental = true - -[profile.release] -opt-level = 3 -lto = "thin" -codegen-units = 1 -panic = "abort" - -[lints] -workspace = true diff --git a/src/core/shared/admin.rs b/src/core/shared/admin.rs index 10dd88626..3602ecb9c 100644 --- a/src/core/shared/admin.rs +++ b/src/core/shared/admin.rs @@ -1,3 +1,4 @@ +#![cfg_attr(feature = "mail", allow(unused_imports))] use axum::{ extract::{Path, Query, State}, http::StatusCode, diff --git a/src/email/mod.rs b/src/email/mod.rs index 2259010da..5efd91fd4 100644 --- a/src/email/mod.rs +++ b/src/email/mod.rs @@ -1,3 +1,4 @@ +#![cfg_attr(feature = "mail", allow(unused_imports))] pub mod ui; use crate::{core::config::EmailConfig, core::urls::ApiUrls, shared::state::AppState}; @@ -16,6 +17,8 @@ use base64::{engine::general_purpose, Engine as _}; use chrono::{DateTime, Utc}; use diesel::prelude::*; use diesel::sql_types::{Bool, Integer, Nullable, Text, Timestamptz, Uuid as DieselUuid, Varchar}; +#[cfg(feature = "mail")] +#[cfg(feature = "mail")] use imap::types::Seq; use lettre::{transport::smtp::authentication::Credentials, Message, SmtpTransport, Transport}; use log::{debug, info, warn}; diff --git a/src/monitoring/real_time.rs b/src/monitoring/real_time.rs index 59186632a..05403a8aa 100644 --- a/src/monitoring/real_time.rs +++ b/src/monitoring/real_time.rs @@ -592,7 +592,7 @@ impl MetricsCollector { async fn collect_disk_usage(&self) -> f64 { #[cfg(target_os = "linux")] { - if let Ok(output) = tokio::process::Command::new("df") + if let Ok(output) = std::process::Command::new("df") .args(["-h", "/"]) .output() .await diff --git a/src/security/command_guard.rs b/src/security/command_guard.rs index 630a5fb07..f97fc0bfb 100644 --- a/src/security/command_guard.rs +++ b/src/security/command_guard.rs @@ -261,7 +261,7 @@ impl SafeCommand { } pub async fn execute_async(&self) -> Result { - let mut cmd = tokio::process::Command::new(&self.command); + let mut cmd = std::process::Command::new(&self.command); cmd.args(&self.args); if let Some(ref dir) = self.working_dir { diff --git a/src/settings/mod.rs b/src/settings/mod.rs index ffb7729ac..ec05f8534 100644 --- a/src/settings/mod.rs +++ b/src/settings/mod.rs @@ -1,3 +1,4 @@ +#![cfg_attr(feature = "mail", allow(unused_imports))] pub mod audit_log; pub mod menu_config; pub mod permission_inheritance; @@ -204,7 +205,9 @@ async fn test_smtp_connection( State(_state): State>, Json(config): Json, ) -> Json { +#[cfg(feature = "mail")] use lettre::SmtpTransport; +#[cfg(feature = "mail")] use lettre::transport::smtp::authentication::Credentials;