重构配置文件
This commit is contained in:
parent
5bd5dba299
commit
81ee85afd4
@ -114,6 +114,7 @@ impl ConfigFile {
|
|||||||
|
|
||||||
/// 同理, 也帮你骂好了
|
/// 同理, 也帮你骂好了
|
||||||
/// 甚至不需要你 ?
|
/// 甚至不需要你 ?
|
||||||
|
#[allow(unused)]
|
||||||
pub fn read_or_panic() -> Self {
|
pub fn read_or_panic() -> Self {
|
||||||
Self::try_read().expect("Please Fix the config.toml file")
|
Self::try_read().expect("Please Fix the config.toml file")
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ use crate::model;
|
|||||||
use crate::model::sea_orm_active_enums::SaveType;
|
use crate::model::sea_orm_active_enums::SaveType;
|
||||||
use migration::{Migrator, MigratorTrait, SaveId, FULL_DATA_VIEW, TEXT_DATA_MAX_LEN};
|
use migration::{Migrator, MigratorTrait, SaveId, FULL_DATA_VIEW, TEXT_DATA_MAX_LEN};
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct DbData {
|
pub struct DbData {
|
||||||
pub text: Option<String>,
|
pub text: Option<String>,
|
||||||
@ -44,6 +45,8 @@ impl From<(model::main_data::Model, model::long_data::Model)> for DbData {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
|
/// 我承认, 这玩意大部分没用上(捂脸)
|
||||||
impl DbData {
|
impl DbData {
|
||||||
pub fn new(save_id: SaveId, data: String, save_type: SaveType) -> Self {
|
pub fn new(save_id: SaveId, data: String, save_type: SaveType) -> Self {
|
||||||
let len = data.len() as i64;
|
let len = data.len() as i64;
|
||||||
|
Loading…
Reference in New Issue
Block a user