@@ -131,7 +131,7 @@ impl Inner {
131131 test_name : & str ,
132132 span : & Span ,
133133 command : & Command ,
134- ) -> Result < Option < ( Exec , Option < Box < Postprocess > > ) > > {
134+ ) -> Result < Result < ( Exec , Option < Box < Postprocess > > ) > > {
135135 let mut source_file_it_message_state_map =
136136 self . source_file_it_message_state_map . borrow_mut ( ) ;
137137 #[ allow( clippy:: expect_used) ]
@@ -144,20 +144,21 @@ impl Inner {
144144 . entry ( test_name. to_owned ( ) )
145145 . or_default ( ) ;
146146 if * state != ItMessageState :: Found {
147+ let msg = format ! ( "`it` message {test_name:?} was not found during dry run" ) ;
147148 if * state == ItMessageState :: NotFound {
148149 source_warn (
149150 context,
150151 Warning :: ItMessageNotFound ,
151152 span,
152- & format ! ( "`it` message {test_name:?} was not found during dry run" ) ,
153+ & msg ,
153154 WarnFlags :: empty ( ) ,
154155 ) ?;
155156 * state = ItMessageState :: WarningEmitted ;
156157 }
157- // smoelius: Returning `None` here causes Necessist to associate `Outcome::Nonbuildable`
158- // with this span. This is not ideal, but there is no ideal choice for this situation
159- // currently.
160- return Ok ( None ) ;
158+ // smoelius: Returning an error here causes Necessist to associate
159+ // `Outcome::Nonbuildable` with this span. This is not ideal, but there is no ideal
160+ // choice for this situation currently.
161+ return Ok ( Err ( anyhow ! ( msg ) ) ) ;
161162 }
162163
163164 let mut exec = util:: exec_from_command ( command) ;
@@ -166,7 +167,7 @@ impl Inner {
166167
167168 debug ! ( "{exec:?}" ) ;
168169
169- Ok ( Some ( ( exec, None ) ) )
170+ Ok ( Ok ( ( exec, None ) ) )
170171 }
171172}
172173
0 commit comments