138 lines
5.2 KiB
Text
138 lines
5.2 KiB
Text
Checking chat_server v0.2.0 (/home/senke/Documents/veza/veza-chat-server)
|
|
error[E0432]: unresolved imports `sysinfo::CpuExt`, `sysinfo::SystemExt`, `sysinfo::ProcessExt`
|
|
--> src/monitoring.rs:193:15
|
|
|
|
|
193 | use sysinfo::{CpuExt, System, SystemExt, Pid, ProcessExt};
|
|
| ^^^^^^ ^^^^^^^^^ ^^^^^^^^^^ no `ProcessExt` in the root
|
|
| | |
|
|
| | no `SystemExt` in the root
|
|
| no `CpuExt` in the root
|
|
|
|
|
help: a similar name exists in the module
|
|
|
|
|
193 - use sysinfo::{CpuExt, System, SystemExt, Pid, ProcessExt};
|
|
193 + use sysinfo::{CpuExt, System, System, Pid, ProcessExt};
|
|
|
|
|
help: a similar name exists in the module
|
|
|
|
|
193 - use sysinfo::{CpuExt, System, SystemExt, Pid, ProcessExt};
|
|
193 + use sysinfo::{CpuExt, System, SystemExt, Pid, Process};
|
|
|
|
|
|
|
warning: unused imports: `Pool` and `Postgres`
|
|
--> src/config.rs:2:20
|
|
|
|
|
2 | use sqlx::{PgPool, Pool, Postgres};
|
|
| ^^^^ ^^^^^^^^
|
|
|
|
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
|
|
|
warning: unused import: `error`
|
|
--> src/config.rs:5:22
|
|
|
|
|
5 | use tracing::{debug, error, info, warn};
|
|
| ^^^^^
|
|
|
|
warning: unused imports: `Error as LapinError`, `ExchangeKind`, and `options::ExchangeDeclareOptions`
|
|
--> src/event_bus.rs:2:5
|
|
|
|
|
2 | options::ExchangeDeclareOptions, types::FieldTable, Channel, Connection, ConnectionProperties,
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
3 | Error as LapinError, ExchangeKind,
|
|
| ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
|
|
|
|
warning: unused import: `warn`
|
|
--> src/typing_indicator.rs:5:40
|
|
|
|
|
5 | use tracing::{info, debug, instrument, warn};
|
|
| ^^^^
|
|
|
|
warning: variable does not need to be mutable
|
|
--> src/delivered_status.rs:57:21
|
|
|
|
|
57 | if let Some(mut status) = existing {
|
|
| ----^^^^^^
|
|
| |
|
|
| help: remove this `mut`
|
|
|
|
|
= note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
|
|
|
|
warning: variable does not need to be mutable
|
|
--> src/read_receipts.rs:86:21
|
|
|
|
|
86 | if let Some(mut receipt) = existing {
|
|
| ----^^^^^^^
|
|
| |
|
|
| help: remove this `mut`
|
|
|
|
error[E0599]: no method named `refresh_cpu` found for struct `tokio::sync::RwLockWriteGuard<'_, sysinfo::System>` in the current scope
|
|
--> src/monitoring.rs:319:13
|
|
|
|
|
319 | sys.refresh_cpu();
|
|
| ^^^^^^^^^^^
|
|
|
|
|
help: there is a method `refresh_cpu_all` with a similar name
|
|
|
|
|
319 | sys.refresh_cpu_all();
|
|
| ++++
|
|
|
|
error[E0599]: no method named `refresh_process` found for struct `tokio::sync::RwLockWriteGuard<'_, sysinfo::System>` in the current scope
|
|
--> src/monitoring.rs:321:13
|
|
|
|
|
321 | sys.refresh_process(Pid::from(std::process::id() as usize));
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
help: there is a method `refresh_processes` with a similar name, but with different arguments
|
|
--> /home/senke/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sysinfo-0.37.2/src/common/system.rs:309:5
|
|
|
|
|
309 | / pub fn refresh_processes(
|
|
310 | | &mut self,
|
|
311 | | processes_to_update: ProcessesToUpdate<'_>,
|
|
312 | | remove_dead_processes: bool,
|
|
313 | | ) -> usize {
|
|
| |______________^
|
|
|
|
error[E0599]: no method named `global_cpu_info` found for struct `tokio::sync::RwLockWriteGuard<'_, sysinfo::System>` in the current scope
|
|
--> src/monitoring.rs:331:23
|
|
|
|
|
331 | let cpu = sys.global_cpu_info().cpu_usage() as f64;
|
|
| ^^^^^^^^^^^^^^^
|
|
|
|
|
help: there is a method `global_cpu_usage` with a similar name
|
|
|
|
|
331 - let cpu = sys.global_cpu_info().cpu_usage() as f64;
|
|
331 + let cpu = sys.global_cpu_usage().cpu_usage() as f64;
|
|
|
|
|
|
|
warning: unreachable expression
|
|
--> src/config.rs:201:9
|
|
|
|
|
194 | / panic!(
|
|
195 | | "SecurityConfig::default() cannot be used in production. \
|
|
196 | | Create SecurityConfig manually with require_env_min_length(\"JWT_SECRET\", 32)"
|
|
197 | | );
|
|
| |_____________- any code following this expression is unreachable
|
|
...
|
|
201 | / Self {
|
|
202 | | jwt_secret: "test_jwt_secret_minimum_32_characters_long".to_string(),
|
|
203 | | jwt_access_duration: Duration::from_secs(900), // 15 min
|
|
204 | | jwt_refresh_duration: Duration::from_secs(86400 * 30), // 30 days
|
|
... |
|
|
212 | | bcrypt_cost: 12,
|
|
213 | | }
|
|
| |_________^ unreachable expression
|
|
|
|
|
= note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default
|
|
|
|
warning: unused variable: `user_id`
|
|
--> src/security/permission.rs:54:17
|
|
|
|
|
54 | user_id,
|
|
| ^^^^^^^ help: try ignoring the field: `user_id: _`
|
|
|
|
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
|
|
|
|
Some errors have detailed explanations: E0432, E0599.
|
|
For more information about an error, try `rustc --explain E0432`.
|
|
warning: `chat_server` (lib) generated 8 warnings
|
|
error: could not compile `chat_server` (lib) due to 4 previous errors; 8 warnings emitted
|