This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 0daff07 fix: Change TestError from uninhabited enum to an empty
struct (#313)
0daff07 is described below
commit 0daff0712f62f6e33bb380bc30fc11b40a2be95a
Author: Martin Grigorov <[email protected]>
AuthorDate: Tue Oct 14 14:53:51 2025 +0300
fix: Change TestError from uninhabited enum to an empty struct (#313)
Fixed the problem with latest nightly:
```
error: unreachable expression
--> avro/src/schema.rs:6054:24
|
6054 | return Err(format!("Expected
Details::InvalidNamespace, got {other:?}").into());
|
^^^^-------------------------------------------------------------------^
| | |
| | any code following this expression is
unreachable
| unreachable expression
|
note: this expression has type `TestError`, which is uninhabited
```
---
avro_test_helper/src/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/avro_test_helper/src/lib.rs b/avro_test_helper/src/lib.rs
index f9fd050..8c570f5 100644
--- a/avro_test_helper/src/lib.rs
+++ b/avro_test_helper/src/lib.rs
@@ -51,7 +51,7 @@ fn after_all() {
/// A custom error type for tests.
#[derive(Debug)]
-pub enum TestError {}
+pub struct TestError {}
/// A converter of any error into [TestError].
/// It is used to print better error messages in the tests.