script: Add message to IndexSizeError (#40463)

Adding an optional message to be attached to a IndexSizeError.

The enum definition of IndexSize is now `IndexSize(Option<String>)`.
Future PRs should probably add more appropriate messages to some of the
`IndexSize(None)`s.

Testing: Just a refactor
Fixes: Partially #39053

Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
This commit is contained in:
WaterWhisperer
2025-11-07 09:08:00 +08:00
committed by GitHub
parent b3ea4f8b10
commit 401165f154
25 changed files with 68 additions and 65 deletions

View File

@@ -37,7 +37,7 @@ impl Convert<Error> for RulesMutateError {
fn convert(self) -> Error {
match self {
RulesMutateError::Syntax => Error::Syntax(None),
RulesMutateError::IndexSize => Error::IndexSize,
RulesMutateError::IndexSize => Error::IndexSize(None),
RulesMutateError::HierarchyRequest => Error::HierarchyRequest,
RulesMutateError::InvalidState => Error::InvalidState(None),
}