Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: clarify answers.toml format #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

duesee
Copy link

@duesee duesee commented Aug 10, 2024

This is to make it more obvious what should actually be defined in answers.toml (as I wasn't sure how up-to-date the Wiki is). I merely reordered the definitions and added some notes that, for example, Network is actually constructed from NetworkInAnswer.

I hope you are interested in this kind of changes. If so, I can make another PR that more clearly separates the deserialization from answers.toml. This would allow to tighten up the definitions (and maybe even derive a "Wizard" for the answers.toml file -- if we want to.)

@@ -34,6 +36,48 @@ pub struct Global {
pub root_ssh_keys: Vec<String>,
}

#[derive(Clone, Deserialize, Serialize, Debug, PartialEq)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub enum KeyboardLayout {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved here from bottom so that Global is fully defined after line 67.

pub hdsize: Option<f64>,
}

// ----- End of `answers.toml` format definition -----
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this line, there is no "external API" anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant