File tree Expand file tree Collapse file tree 1 file changed +0
-44
lines changed Expand file tree Collapse file tree 1 file changed +0
-44
lines changed Original file line number Diff line number Diff line change @@ -126,47 +126,3 @@ impl CodeFile {
126
126
}
127
127
}
128
128
}
129
-
130
-
131
- #[ derive( Default ) ]
132
- struct CodeFileBuilder {
133
- language : Option < Language > ,
134
- path : Option < std:: path:: PathBuf > ,
135
- question_title : Option < String > ,
136
- code : Option < String > ,
137
- }
138
-
139
- impl CodeFileBuilder {
140
- pub fn new ( ) -> Self {
141
- Default :: default ( )
142
- }
143
-
144
- pub fn build ( self ) -> CodeFile {
145
- CodeFile {
146
- language : self . language . unwrap_or ( Language :: Rust ) ,
147
- path : self . path . unwrap_or_else ( || std:: path:: PathBuf :: from ( "main.rs" ) ) ,
148
- question_title : self . question_title . unwrap_or_else ( || String :: new ( ) ) ,
149
- code : self . code . unwrap_or_else ( || String :: new ( ) ) ,
150
- }
151
- }
152
-
153
- pub fn set_language ( mut self , language : Language ) -> Self {
154
- self . language = Some ( language) ;
155
- self
156
- }
157
-
158
- pub fn set_path ( mut self , path : std:: path:: PathBuf ) -> Self {
159
- self . path = Some ( path) ;
160
- self
161
- }
162
-
163
- pub fn set_question_title ( mut self , question_title : String ) -> Self {
164
- self . question_title = Some ( question_title) ;
165
- self
166
- }
167
-
168
- pub fn set_code ( mut self , code : String ) -> Self {
169
- self . code = Some ( code) ;
170
- self
171
- }
172
- }
You can’t perform that action at this time.
0 commit comments