Skip to content

Commit

Permalink
refactor: add non_exhaustive to the Error enum (#112)
Browse files Browse the repository at this point in the history
This lets adding new codes in the future not be breaking changes.
  • Loading branch information
tommy authored Oct 31, 2024
1 parent 33204e5 commit 4b55c9b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::{char, error, fmt};
/// User-facing error codes and messages. These codes are defined in the Javascript implementation here:
/// <https://github.com/jsonata-js/jsonata/blob/9e6b8e6d081e34fbd72fe24ccd703afa9248fec5/src/jsonata.js#L1941>
#[derive(Debug, PartialEq)]
#[non_exhaustive]
pub enum Error {
// Compile time errors
S0101UnterminatedStringLiteral(usize),
Expand Down

0 comments on commit 4b55c9b

Please sign in to comment.