This repository was archived by the owner on Sep 10, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 15 files changed +19
-53
lines changed Expand file tree Collapse file tree 15 files changed +19
-53
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,7 @@ pub struct BrandingConfig {
46
46
47
47
#[ async_trait]
48
48
impl ConfigurationSection for BrandingConfig {
49
- fn path ( ) -> & ' static str {
50
- "branding"
51
- }
49
+ const PATH : Option < & ' static str > = Some ( "branding" ) ;
52
50
53
51
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
54
52
where
Original file line number Diff line number Diff line change @@ -181,9 +181,7 @@ impl IntoIterator for ClientsConfig {
181
181
182
182
#[ async_trait]
183
183
impl ConfigurationSection for ClientsConfig {
184
- fn path ( ) -> & ' static str {
185
- "clients"
186
- }
184
+ const PATH : Option < & ' static str > = Some ( "clients" ) ;
187
185
188
186
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
189
187
where
Original file line number Diff line number Diff line change @@ -146,9 +146,7 @@ pub struct DatabaseConfig {
146
146
147
147
#[ async_trait]
148
148
impl ConfigurationSection for DatabaseConfig {
149
- fn path ( ) -> & ' static str {
150
- "database"
151
- }
149
+ const PATH : Option < & ' static str > = Some ( "database" ) ;
152
150
153
151
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
154
152
where
Original file line number Diff line number Diff line change @@ -128,9 +128,7 @@ impl Default for EmailConfig {
128
128
129
129
#[ async_trait]
130
130
impl ConfigurationSection for EmailConfig {
131
- fn path ( ) -> & ' static str {
132
- "email"
133
- }
131
+ const PATH : Option < & ' static str > = Some ( "email" ) ;
134
132
135
133
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
136
134
where
Original file line number Diff line number Diff line change @@ -56,9 +56,7 @@ impl Default for ExperimentalConfig {
56
56
57
57
#[ async_trait]
58
58
impl ConfigurationSection for ExperimentalConfig {
59
- fn path ( ) -> & ' static str {
60
- "experimental"
61
- }
59
+ const PATH : Option < & ' static str > = Some ( "experimental" ) ;
62
60
63
61
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
64
62
where
Original file line number Diff line number Diff line change @@ -394,9 +394,7 @@ impl Default for HttpConfig {
394
394
395
395
#[ async_trait]
396
396
impl ConfigurationSection for HttpConfig {
397
- fn path ( ) -> & ' static str {
398
- "http"
399
- }
397
+ const PATH : Option < & ' static str > = Some ( "http" ) ;
400
398
401
399
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
402
400
where
Original file line number Diff line number Diff line change @@ -50,9 +50,7 @@ pub struct MatrixConfig {
50
50
51
51
#[ async_trait]
52
52
impl ConfigurationSection for MatrixConfig {
53
- fn path ( ) -> & ' static str {
54
- "matrix"
55
- }
53
+ const PATH : Option < & ' static str > = Some ( "matrix" ) ;
56
54
57
55
async fn generate < R > ( mut rng : R ) -> anyhow:: Result < Self >
58
56
where
Original file line number Diff line number Diff line change @@ -116,10 +116,6 @@ pub struct RootConfig {
116
116
117
117
#[ async_trait]
118
118
impl ConfigurationSection for RootConfig {
119
- fn path ( ) -> & ' static str {
120
- ""
121
- }
122
-
123
119
async fn generate < R > ( mut rng : R ) -> anyhow:: Result < Self >
124
120
where
125
121
R : Rng + Send ,
@@ -195,10 +191,6 @@ pub struct AppConfig {
195
191
196
192
#[ async_trait]
197
193
impl ConfigurationSection for AppConfig {
198
- fn path ( ) -> & ' static str {
199
- ""
200
- }
201
-
202
194
async fn generate < R > ( mut rng : R ) -> anyhow:: Result < Self >
203
195
where
204
196
R : Rng + Send ,
@@ -251,10 +243,6 @@ pub struct SyncConfig {
251
243
252
244
#[ async_trait]
253
245
impl ConfigurationSection for SyncConfig {
254
- fn path ( ) -> & ' static str {
255
- ""
256
- }
257
-
258
246
async fn generate < R > ( mut rng : R ) -> anyhow:: Result < Self >
259
247
where
260
248
R : Rng + Send ,
Original file line number Diff line number Diff line change @@ -57,9 +57,7 @@ impl Default for PasswordsConfig {
57
57
58
58
#[ async_trait]
59
59
impl ConfigurationSection for PasswordsConfig {
60
- fn path ( ) -> & ' static str {
61
- "passwords"
62
- }
60
+ const PATH : Option < & ' static str > = Some ( "passwords" ) ;
63
61
64
62
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
65
63
where
Original file line number Diff line number Diff line change @@ -106,9 +106,7 @@ impl Default for PolicyConfig {
106
106
107
107
#[ async_trait]
108
108
impl ConfigurationSection for PolicyConfig {
109
- fn path ( ) -> & ' static str {
110
- "policy"
111
- }
109
+ const PATH : Option < & ' static str > = Some ( "policy" ) ;
112
110
113
111
async fn generate < R > ( _rng : R ) -> anyhow:: Result < Self >
114
112
where
You can’t perform that action at this time.
0 commit comments