Skip to content

Commit

Permalink
move doc comments under attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
g-plane committed Oct 15, 2023
1 parent 89e07d6 commit cb5f84d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions malva/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
#[cfg(feature = "config_serde")]
use serde::{Deserialize, Serialize};

/// The whole configuration of Malva.
///
/// For detail, please refer to [Configuration](https://github.com/g-plane/malva/blob/main/docs/config.md) on GitHub.
#[derive(Clone, Debug, Default)]
#[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "config_serde", serde(rename_all = "camelCase", default))]
/// The whole configuration of Malva.
///
/// For detail, please refer to [Configuration](https://github.com/g-plane/malva/blob/main/docs/config.md) on GitHub.
pub struct FormatOptions {
#[cfg_attr(feature = "config_serde", serde(flatten))]
pub layout: LayoutOptions,
#[cfg_attr(feature = "config_serde", serde(flatten))]
pub language: LanguageOptions,
}

/// Configuration related to layout, such as indentation or print width.
#[derive(Clone, Debug)]
#[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "config_serde", serde(rename_all = "camelCase", default))]
/// Configuration related to layout, such as indentation or print width.
pub struct LayoutOptions {
/// See [`printWidth`](https://github.com/g-plane/malva/blob/main/docs/config.md#printwidth) on GitHub
pub print_width: usize,
Expand Down Expand Up @@ -60,10 +60,10 @@ impl From<LineBreak> for tiny_pretty::LineBreak {
}
}

/// Configuration related to syntax.
#[derive(Clone, Debug, Default)]
#[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "config_serde", serde(rename_all = "camelCase", default))]
/// Configuration related to syntax.
pub struct LanguageOptions {
/// See [`hexCase`](https://github.com/g-plane/malva/blob/main/docs/config.md#hexcase) on GitHub
pub hex_case: HexCase,
Expand Down Expand Up @@ -98,8 +98,8 @@ pub enum HexCase {
#[cfg_attr(feature = "config_serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "config_serde", serde(rename_all = "camelCase"))]
pub enum Quotes {
/// Make all strings to double quoted.
#[default]
/// Make all strings to double quoted.
AlwaysDouble,
/// Make all strings to single quoted.
AlwaysSingle,
Expand Down

0 comments on commit cb5f84d

Please sign in to comment.