data: move the YAML data files into a top-level data/ directory
This commit is contained in:
+1
-1
@@ -43,7 +43,7 @@ struct Data {
|
||||
dist: std::collections::HashMap<String, DistData>,
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ pub struct QuirksConfig {
|
||||
pub quirks: HashMap<String, PackageQuirks>,
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user