1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-03 03:42:26 +01:00

Mark MappingTarget as #[non_exhaustive] for increased semver flexibility

This will allow us to add new enum variants in the future without breaking
semver compatibility. See
https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute

Since we already added an enum variant since v0.18.3, now is a good time to mark
it as `#[non_exhaustive]`.
This commit is contained in:
Martin Nordholts
2022-01-02 21:46:15 +01:00
parent f89869b5b2
commit 68528983d7
3 changed files with 5 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ use globset::{Candidate, GlobBuilder, GlobMatcher};
pub mod ignored_suffixes;
#[derive(Debug, Clone, Copy, PartialEq)]
#[non_exhaustive]
pub enum MappingTarget<'a> {
/// For mapping a path to a specific syntax.
MapTo(&'a str),