Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74d936c

Browse files
authored
Merge pull request #837 from dicej/toml-serialization
move hashtables to end of toml-serializable structs
2 parents c4acc31 + bae58a1 commit 74d936c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/loader/src/local/config.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ pub struct RawAppManifest {
2828
#[serde(flatten)]
2929
pub info: RawAppInformation,
3030

31-
/// Application-specific configuration schema.
32-
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
33-
pub variables: HashMap<String, RawVariable>,
34-
3531
/// Configuration for the application components.
3632
#[serde(rename = "component")]
3733
pub components: Vec<RawComponentManifest>,
34+
35+
/// Application-specific configuration schema.
36+
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
37+
pub variables: HashMap<String, RawVariable>,
3838
}
3939

4040
/// General application information.
@@ -71,10 +71,10 @@ pub struct RawComponentManifest {
7171
pub wasm: RawWasmConfig,
7272
/// Trigger configuration.
7373
pub trigger: TriggerConfig,
74-
/// Component-specific configuration values.
75-
pub config: Option<HashMap<String, String>>,
7674
/// Build configuration for the component.
7775
pub build: Option<RawBuildConfig>,
76+
/// Component-specific configuration values.
77+
pub config: Option<HashMap<String, String>>,
7878
}
7979

8080
/// Build configuration for the component.
@@ -92,8 +92,6 @@ pub struct RawBuildConfig {
9292
#[derive(Clone, Debug, Deserialize, Serialize)]
9393
#[serde(deny_unknown_fields, rename_all = "snake_case")]
9494
pub struct RawWasmConfig {
95-
/// Environment variables to be mapped inside the Wasm module at runtime.
96-
pub environment: Option<HashMap<String, String>>,
9795
/// Files to be mapped inside the Wasm module at runtime.
9896
///
9997
/// In the local configuration file, this is a vector, each element of which
@@ -105,6 +103,8 @@ pub struct RawWasmConfig {
105103
pub exclude_files: Option<Vec<String>>,
106104
/// Optional list of HTTP hosts the component is allowed to connect.
107105
pub allowed_http_hosts: Option<Vec<String>>,
106+
/// Environment variables to be mapped inside the Wasm module at runtime.
107+
pub environment: Option<HashMap<String, String>>,
108108
}
109109

110110
/// An entry in the `files` list mapping a source path to an absolute

0 commit comments

Comments
 (0)