Add CI quality gate

This commit is contained in:
Mikhail Kilin
2026-05-17 18:55:36 +03:00
parent 2d4c1906d5
commit 51e9cf5c10
13 changed files with 50 additions and 60 deletions

View File

@@ -33,17 +33,12 @@ pub fn acquire_lock(account_name: &str) -> Result<File, String> {
// Ensure parent directory exists
if let Some(parent) = lock_path.parent() {
fs::create_dir_all(parent).map_err(|e| {
format!(
"Не удалось создать директорию для lock-файла: {}",
e
)
})?;
fs::create_dir_all(parent)
.map_err(|e| format!("Не удалось создать директорию для lock-файла: {}", e))?;
}
let file = File::create(&lock_path).map_err(|e| {
format!("Не удалось создать lock-файл {}: {}", lock_path.display(), e)
})?;
let file = File::create(&lock_path)
.map_err(|e| format!("Не удалось создать lock-файл {}: {}", lock_path.display(), e))?;
file.try_lock_exclusive().map_err(|_| {
format!(

View File

@@ -74,4 +74,3 @@ pub async fn select_folder<T: TdClientTrait>(app: &mut App<T>, folder_idx: usize
app.chat_list_state.select(Some(0));
}
}

View File

@@ -21,10 +21,7 @@ pub mod modal;
pub mod profile;
pub mod search;
pub use chat_loader::{
process_chat_init_events,
process_pending_chat_init,
};
pub use chat_loader::{process_chat_init_events, process_pending_chat_init};
pub use clipboard::*;
pub use global::*;
pub use profile::get_available_actions_count;

View File

@@ -56,12 +56,7 @@ pub fn render<T: TdClientTrait>(f: &mut Frame, area: Rect, app: &App<T>) {
if idx > 0 {
lines.push(Line::from(""));
}
lines.extend(render_message_item(
msg,
idx == selected_index,
content_width,
3,
));
lines.extend(render_message_item(msg, idx == selected_index, content_width, 3));
}
if lines.is_empty() {

View File

@@ -80,12 +80,7 @@ pub fn render<T: TdClientTrait>(f: &mut Frame, area: Rect, app: &App<T>) {
if idx > 0 {
lines.push(Line::from(""));
}
lines.extend(render_message_item(
msg,
idx == selected_index,
content_width,
2,
));
lines.extend(render_message_item(msg, idx == selected_index, content_width, 2));
}
}

View File

@@ -1,6 +1,6 @@
use chrono::{DateTime, Local, NaiveDate, Utc};
#[cfg(test)]
use chrono::FixedOffset;
use chrono::{DateTime, Local, NaiveDate, Utc};
use std::time::{SystemTime, UNIX_EPOCH};
pub trait LocalTimeSource {