rush_sync_server/commands/history/
config.rs1use crate::core::prelude::*;
2
3#[derive(Debug, Clone)]
4pub struct HistoryConfig {
5 pub max_entries: usize,
6 pub save_duplicates: bool,
7 pub save_empty: bool,
8}
9
10impl HistoryConfig {
11 pub fn from_main_config(config: &Config) -> Self {
12 Self {
13 max_entries: config.max_history,
14 save_duplicates: false,
15 save_empty: false,
16 }
17 }
18}
19
20impl Default for HistoryConfig {
21 fn default() -> Self {
22 Self {
23 max_entries: 30,
24 save_duplicates: false,
25 save_empty: false,
26 }
27 }
28}