flake.lock: bump, Cargo.lock: bump, Cargo.toml: update inputs, format, etc
Some checks failed
Build / build (push) Has been cancelled
Build / check (push) Has been cancelled
Build / docs (push) Has been cancelled

This commit is contained in:
2025-05-07 10:39:10 +02:00
parent 8ba946976d
commit c2d22ee7f8
19 changed files with 459 additions and 304 deletions

View File

@@ -1,12 +1,12 @@
use std::{fs, path::PathBuf};
use anyhow::Context;
use nix::libc::{exit, EXIT_SUCCESS};
use nix::libc::{EXIT_SUCCESS, exit};
use std::os::unix::net::UnixStream as StdUnixStream;
use tokio::net::UnixStream as TokioUnixStream;
use crate::{
core::common::{UnixUser, DEFAULT_CONFIG_PATH, DEFAULT_SOCKET_PATH},
core::common::{DEFAULT_CONFIG_PATH, DEFAULT_SOCKET_PATH, UnixUser},
server::{config::read_config_from_path, server_loop::handle_requests_for_single_session},
};

View File

@@ -66,11 +66,7 @@ impl UnixUser {
#[inline]
pub(crate) fn yn(b: bool) -> &'static str {
if b {
"Y"
} else {
"N"
}
if b { "Y" } else { "N" }
}
#[inline]

View File

@@ -1,4 +1,4 @@
use anyhow::{anyhow, Context};
use anyhow::{Context, anyhow};
use itertools::Itertools;
use prettytable::Table;
use serde::{Deserialize, Serialize};
@@ -12,7 +12,7 @@ use super::{
protocol::{MySQLDatabase, MySQLUser},
};
use crate::server::sql::database_privilege_operations::{
DatabasePrivilegeRow, DATABASE_PRIVILEGE_FIELDS,
DATABASE_PRIVILEGE_FIELDS, DatabasePrivilegeRow,
};
pub fn db_priv_field_human_readable_name(name: &str) -> String {
@@ -288,10 +288,10 @@ fn parse_privilege_row_from_editor(row: &str) -> PrivilegeRowParseResult {
match parts.len() {
n if (n < DATABASE_PRIVILEGE_FIELDS.len()) => {
return PrivilegeRowParseResult::TooFewFields(n)
return PrivilegeRowParseResult::TooFewFields(n);
}
n if (n > DATABASE_PRIVILEGE_FIELDS.len()) => {
return PrivilegeRowParseResult::TooManyFields(n)
return PrivilegeRowParseResult::TooManyFields(n);
}
_ => {}
}

View File

@@ -7,7 +7,7 @@ use std::{
use serde::{Deserialize, Serialize};
use tokio::net::UnixStream;
use tokio_serde::{formats::Bincode, Framed as SerdeFramed};
use tokio_serde::{Framed as SerdeFramed, formats::Bincode};
use tokio_util::codec::{Framed, LengthDelimitedCodec};
use crate::core::{database_privileges::DatabasePrivilegesDiff, protocol::*};