File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -169,19 +169,6 @@ pub struct FixtureEntry {
169169/// // - other meta
170170/// ```
171171pub fn parse_fixture ( fixture : & str ) -> Vec < FixtureEntry > {
172- let mut res = Vec :: new ( ) ;
173- let mut buf = String :: new ( ) ;
174- let mut meta: Option < & str > = None ;
175-
176- macro_rules! flush {
177- ( ) => {
178- if let Some ( meta) = meta {
179- res. push( FixtureEntry { meta: meta. to_string( ) , text: buf. clone( ) } ) ;
180- buf. clear( ) ;
181- }
182- } ;
183- } ;
184-
185172 let margin = fixture
186173 . lines ( )
187174 . filter ( |it| it. trim_start ( ) . starts_with ( "//-" ) )
@@ -201,6 +188,19 @@ pub fn parse_fixture(fixture: &str) -> Vec<FixtureEntry> {
201188 }
202189 } ) ;
203190
191+ let mut res = Vec :: new ( ) ;
192+ let mut buf = String :: new ( ) ;
193+ let mut meta: Option < & str > = None ;
194+
195+ macro_rules! flush {
196+ ( ) => {
197+ if let Some ( meta) = meta {
198+ res. push( FixtureEntry { meta: meta. to_string( ) , text: buf. clone( ) } ) ;
199+ buf. clear( ) ;
200+ }
201+ } ;
202+ } ;
203+
204204 for line in lines {
205205 if line. starts_with ( "//-" ) {
206206 flush ! ( ) ;
You can’t perform that action at this time.
0 commit comments