Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit a859285

Browse files
committed
Standardize derive order
1 parent 243b059 commit a859285

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/common.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl Default for Permissions {
3131

3232
/// "Base" permissions, where all individual permissions are configured
3333
/// with a blanket setting.
34-
#[derive(Deserialize, Default, Debug, PartialEq)]
34+
#[derive(Deserialize, Debug, Default, PartialEq)]
3535
#[serde(rename_all = "kebab-case")]
3636
pub enum BasePermission {
3737
/// Whatever default permissions come from the workflow's `GITHUB_TOKEN`.
@@ -44,7 +44,7 @@ pub enum BasePermission {
4444
}
4545

4646
/// A singular permission setting.
47-
#[derive(Deserialize, Default, Debug, PartialEq)]
47+
#[derive(Deserialize, Debug, Default, PartialEq)]
4848
#[serde(rename_all = "kebab-case")]
4949
pub enum Permission {
5050
/// Read access.
@@ -68,7 +68,7 @@ pub type Env = IndexMap<String, EnvValue>;
6868
/// This type also gets used for other places where GitHub Actions
6969
/// contextually reinterprets a YAML value as a string, e.g. trigger
7070
/// input values.
71-
#[derive(Serialize, Deserialize, Debug, PartialEq)]
71+
#[derive(Deserialize, Serialize, Debug, PartialEq)]
7272
#[serde(untagged)]
7373
pub enum EnvValue {
7474
// Missing values are empty strings.
@@ -92,7 +92,7 @@ impl Display for EnvValue {
9292
/// key can have either a scalar value or an array of values.
9393
///
9494
/// This only appears internally, as an intermediate type for `scalar_or_vector`.
95-
#[derive(Debug, Deserialize, PartialEq)]
95+
#[derive(Deserialize, Debug, PartialEq)]
9696
#[serde(untagged)]
9797
enum SoV<T> {
9898
One(T),
@@ -119,7 +119,7 @@ where
119119
/// A bool or string. This is useful for cases where GitHub Actions contextually
120120
/// reinterprets a YAML boolean as a string, e.g. `run: true` really means
121121
/// `run: 'true'`.
122-
#[derive(Debug, Deserialize, PartialEq)]
122+
#[derive(Deserialize, Debug, PartialEq)]
123123
#[serde(untagged)]
124124
enum BoS {
125125
Bool(bool),
@@ -138,7 +138,7 @@ impl From<BoS> for String {
138138
/// An `if:` condition in a job or action definition.
139139
///
140140
/// These are either booleans or bare (i.e. non-curly) expressions.
141-
#[derive(Debug, Deserialize, PartialEq, Serialize)]
141+
#[derive(Deserialize, Serialize, Debug, PartialEq)]
142142
#[serde(untagged)]
143143
pub enum If {
144144
Bool(bool),

src/common/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl<'de> Deserialize<'de> for ExplicitExpr {
6969
/// A "literal or expr" type, for places in GitHub Actions where a
7070
/// key can either have a literal value (array, object, etc.) or an
7171
/// expression string.
72-
#[derive(Debug, Deserialize, PartialEq, Serialize)]
72+
#[derive(Deserialize, Serialize, Debug, PartialEq)]
7373
#[serde(untagged)]
7474
pub enum LoE<T> {
7575
// Observe that `Expr` comes first, since `LoE<String>` should always

src/workflow/event.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum BareEvent {
5757
/// Workflow event triggers, with bodies.
5858
///
5959
/// Like [`BareEvent`], but with per-event properties.
60-
#[derive(Default, Deserialize, Serialize, Debug)]
60+
#[derive(Deserialize, Serialize, Debug, Default)]
6161
#[serde(default, rename_all = "snake_case")]
6262
pub struct Events {
6363
pub branch_protection_rule: OptionalBody<GenericEvent>,
@@ -157,7 +157,7 @@ impl Events {
157157
/// between the non-presence of an event (no trigger) and the presence
158158
/// of an empty event body (e.g. `pull_request:`), which means "trigger
159159
/// with the defaults for this event type."
160-
#[derive(Default, Serialize, Debug)]
160+
#[derive(Serialize, Debug, Default)]
161161
pub enum OptionalBody<T> {
162162
Default,
163163
#[default]

src/workflow/job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct NormalJob {
3838
pub services: IndexMap<String, Container>,
3939
}
4040

41-
#[derive(Debug, Deserialize, PartialEq)]
41+
#[derive(Deserialize, Debug, PartialEq)]
4242
#[serde(rename_all = "kebab-case", untagged, remote = "Self")]
4343
pub enum RunsOn {
4444
#[serde(deserialize_with = "crate::common::scalar_or_vector")]

0 commit comments

Comments
 (0)