Skip to content

Commit 5e41093

Browse files
committed
Fail on unknown cases
1 parent ccc2dbb commit 5e41093

File tree

1 file changed

+2
-2
lines changed
  • compiler-rs/clients_schema_to_rest_api_spec/src

1 file changed

+2
-2
lines changed

compiler-rs/clients_schema_to_rest_api_spec/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,11 @@ fn get_type_name(value_of: &ValueOf, types: &IndexMap<TypeName, TypeDefinition>)
329329
return literal;
330330
}
331331
}
332-
_ => todo!(),
332+
_ => panic!("Expected UnionOf or InstanceOf but got {:?}", alias.typ),
333333
},
334334
_ => panic!("Expected TypeAlias but got {:?}", full_type),
335335
}
336-
return "???".to_string();
336+
panic!("Unhandled type: {:?}", full_type);
337337
}
338338
}
339339
_ => todo!(),

0 commit comments

Comments
 (0)