Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
When checking schema compatibility between schemas some code blocks are never reached. For example, these lines are never reached because writer and readers schemas are for sure the same type (record) which is previously compared.
This issue leads to unnecessary if let blocks which can be suppressed and `Errors` that are never reached. For example the following code could be removed because it is know before hand that the schema is Record which it has a name and only one error can be retrieved.
let Schema::Record(RecordSchema { name: w_name, .. }) = writers_schema { ... }
Solution: Refactor the code and add more unittest to match_schemas function to clean up the unreachable code