diff --git a/crates/settings/src/migrate.rs b/crates/settings/src/migrate.rs index 6b8562651..1c00e1370 100644 --- a/crates/settings/src/migrate.rs +++ b/crates/settings/src/migrate.rs @@ -60,9 +60,12 @@ pub struct LegacyFile { /// store reports them in [`LoadReport::section_errors`](crate::LoadReport::section_errors), the /// same place a `config.toml` load puts its own. An `Err` means the file is unusable and the /// next legacy file is tried. - pub parse: fn(&[u8]) -> Result<(T, Vec), String>, + pub parse: ParseLegacy, } +/// Parses a legacy file's bytes: the value and the values reset to defaults, or why the file is unusable. +pub type ParseLegacy = fn(&[u8]) -> Result<(T, Vec), String>; + /// A legacy file that parsed: its value, the values reset to defaults, and where it was. pub type Imported = (T, Vec, PathBuf);