diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 18:23:39 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 18:24:17 +0200 |
| commit | 0bcb8e7bd8aefb089ad88f5ebfd7364ae81cdf06 (patch) | |
| tree | 83e098b147f25670ff15f7bcd1ac72dc1115b3b6 /crates/server/src/settings.rs | |
| parent | chore: Remove some warnings (cargo fix) (diff) | |
| download | atuin-0bcb8e7bd8aefb089ad88f5ebfd7364ae81cdf06.zip | |
chore(server): Remove warnings
Diffstat (limited to 'crates/server/src/settings.rs')
| -rw-r--r-- | crates/server/src/settings.rs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/crates/server/src/settings.rs b/crates/server/src/settings.rs index 256aa661..60837525 100644 --- a/crates/server/src/settings.rs +++ b/crates/server/src/settings.rs @@ -9,11 +9,11 @@ use tracing::info; use crate::database::DbSettings; #[derive(Clone, Debug, Deserialize, Serialize)] -pub struct Metrics { +pub(crate) struct Metrics { #[serde(alias = "enabled")] - pub enable: bool, - pub host: String, - pub port: u16, + pub(crate) enable: bool, + pub(crate) host: String, + pub(crate) port: u16, } impl Default for Metrics { @@ -27,29 +27,29 @@ impl Default for Metrics { } #[derive(Clone, Debug, Deserialize, Serialize)] -pub struct Settings { - pub host: String, - pub port: u16, - pub path: String, - pub max_history_length: usize, - pub max_record_size: usize, - pub page_size: i64, - pub metrics: Metrics, +pub(crate) struct Settings { + pub(crate) host: String, + pub(crate) port: u16, + pub(crate) path: String, + pub(crate) max_history_length: usize, + pub(crate) max_record_size: usize, + pub(crate) page_size: i64, + pub(crate) metrics: Metrics, /// Advertise a version that is not what we are _actually_ running /// Many clients compare their version with api.atuin.sh, and if they differ, notify the user /// that an update is available. /// Now that we take beta releases, we should be able to advertise a different version to avoid /// notifying users when the server runs something that is not a stable release. - pub fake_version: Option<String>, + pub(crate) fake_version: Option<String>, #[serde(flatten)] #[expect(clippy::struct_field_names)] - pub db_settings: DbSettings, + pub(crate) db_settings: DbSettings, } impl Settings { - pub fn new() -> Result<Self> { + pub(crate) fn new() -> Result<Self> { // create the config file if it does not exist let mut config_builder = Config::builder() .set_default("host", "127.0.0.1")? |
