From 6e5ecd2f4512d1344bb6d2af561889a63bcf54c6 Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Fri, 18 Sep 2026 13:15:29 +0200 Subject: [PATCH] data: move the YAML data files into a top-level data/ directory --- distro_info.yml => data/distro_info.yml | 0 host_keys.yml => data/host_keys.yml | 0 quirks.yml => data/quirks.yml | 0 src/distro_info.rs | 2 +- src/put/ssh.rs | 2 +- src/quirks.rs | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename distro_info.yml => data/distro_info.yml (100%) rename host_keys.yml => data/host_keys.yml (100%) rename quirks.yml => data/quirks.yml (100%) diff --git a/distro_info.yml b/data/distro_info.yml similarity index 100% rename from distro_info.yml rename to data/distro_info.yml diff --git a/host_keys.yml b/data/host_keys.yml similarity index 100% rename from host_keys.yml rename to data/host_keys.yml diff --git a/quirks.yml b/data/quirks.yml similarity index 100% rename from quirks.yml rename to data/quirks.yml diff --git a/src/distro_info.rs b/src/distro_info.rs index f23ca2b..20f52af 100644 --- a/src/distro_info.rs +++ b/src/distro_info.rs @@ -43,7 +43,7 @@ struct Data { dist: std::collections::HashMap, } -const DATA_YAML: &str = include_str!("../distro_info.yml"); +const DATA_YAML: &str = include_str!("../data/distro_info.yml"); lazy_static! { // The YAML is include_str!'d at compile time and statically valid; if it // ever failed to parse it would be a build-time bug that cannot be diff --git a/src/put/ssh.rs b/src/put/ssh.rs index 0f9e39c..37edc57 100644 --- a/src/put/ssh.rs +++ b/src/put/ssh.rs @@ -29,7 +29,7 @@ use ssh2::{CheckResult, HostKeyType, KnownHostFileKind, KnownHosts, Session}; use crate::ui::prompt; -const HOST_KEYS_YAML: &str = include_str!("../../host_keys.yml"); +const HOST_KEYS_YAML: &str = include_str!("../../data/host_keys.yml"); /// Pinned SSH host key fingerprints, loaded from the bundled /// `host_keys.yml` data file (same pattern as `distro_info.yml`): data diff --git a/src/quirks.rs b/src/quirks.rs index 070f2fb..062fe85 100644 --- a/src/quirks.rs +++ b/src/quirks.rs @@ -44,7 +44,7 @@ pub struct QuirksConfig { pub quirks: HashMap, } -const QUIRKS_YAML: &str = include_str!("../quirks.yml"); +const QUIRKS_YAML: &str = include_str!("../data/quirks.yml"); lazy_static! { static ref QUIRKS_DATA: QuirksConfig = serde_yaml::from_str(QUIRKS_YAML).unwrap(); }