From 8e0ac7c049e8154dccc4a274fb4aadfee2b5424a Mon Sep 17 00:00:00 2001 From: konstin Date: Tue, 31 Mar 2026 17:52:36 +0200 Subject: [PATCH] Declare error type as non_exhaustive The semver checks flagged adding a new error variant as a breaking change. This is correct, but don't actually want to guarantee exhaustiveness, you should be able to check for specific error variants downstream to specialize the error message, but you shouldn't try to match exhaustively, the error representation isn't that stable. Other crates hide the error type altogether, but that's a bad experience as a user, I ran into problems with this before. --- src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/error.rs b/src/error.rs index cac6204..6ea1d4b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,6 +2,7 @@ use std::sync::Arc; /// Error type used for [`crate::AsyncHttpRangeReader`] #[derive(Clone, Debug, thiserror::Error)] +#[non_exhaustive] pub enum AsyncHttpRangeReaderError { /// The server does not support range requests #[error("range requests are not supported")]