File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,23 @@ impl File<FileSourceFile, FileFormat> {
76
76
}
77
77
}
78
78
79
+ impl < T , F > File < T , F >
80
+ where
81
+ F : FileStoredFormat + ' static ,
82
+ T : FileSource < F > ,
83
+ {
84
+ pub fn format ( mut self , format : F ) -> Self {
85
+ self . format = Some ( format) ;
86
+ self
87
+ }
88
+
89
+ /// Set required to false to make a file optional when building the config.
90
+ pub fn required ( mut self , required : bool ) -> Self {
91
+ self . required = required;
92
+ self
93
+ }
94
+ }
95
+
79
96
impl < ' a > From < & ' a Path > for File < FileSourceFile , FileFormat > {
80
97
fn from ( path : & ' a Path ) -> Self {
81
98
Self {
@@ -96,23 +113,6 @@ impl From<PathBuf> for File<FileSourceFile, FileFormat> {
96
113
}
97
114
}
98
115
99
- impl < T , F > File < T , F >
100
- where
101
- F : FileStoredFormat + ' static ,
102
- T : FileSource < F > ,
103
- {
104
- pub fn format ( mut self , format : F ) -> Self {
105
- self . format = Some ( format) ;
106
- self
107
- }
108
-
109
- /// Set required to false to make a file optional when building the config.
110
- pub fn required ( mut self , required : bool ) -> Self {
111
- self . required = required;
112
- self
113
- }
114
- }
115
-
116
116
impl < T , F > Source for File < T , F >
117
117
where
118
118
F : FileStoredFormat + Debug + Clone + Send + Sync + ' static ,
You can’t perform that action at this time.
0 commit comments