Remove unused `HeaderLevel` enum
Dependencies
- [2]
CQEA2ZDIParse evaluated Typst code instead of AST - [3]
GYTRFADRSupport Typst subdirectories - [4]
MPTQGIIJImprove `typst_rust_gen` function names - [5]
BA5Y6VSEOutput Rust code using `syn` - [6]
2N3KOCP7Create MVP Pandoc->Rust compiler - [7]
RAWT2FQSNest Xilem tuples longer than 10 elements - [8]
HEIF2O2EMigrate from `pandoc` to `typst` for AST processing - [9]
YKL5NCLHImport items from `syn` - [10]
JCYJWUI3Add support for various text formats
Change contents
- edit in crates/typser/src/lib.rs at line 4
use std::num::NonZeroUsize; - edit in crates/typser/src/lib.rs at line 18[3.33]→[3.1232:1233](∅→∅),[3.113]→[3.1232:1233](∅→∅),[3.1162]→[3.1232:1233](∅→∅),[3.1232]→[3.1232:1233](∅→∅),[3.1233]→[3.114:309](∅→∅),[3.309]→[3.458:571](∅→∅),[3.571]→[3.398:782](∅→∅),[3.398]→[3.398:782](∅→∅)
// Safely wrap i64 header levels in an enumenum HeaderLevel {H1,H2,H3,H4,H5,H6,}// This is not TryFrom as there's not really much we can do to handle the error?impl From<NonZeroUsize> for HeaderLevel {fn from(value: NonZeroUsize) -> Self {match value.get() {1 => HeaderLevel::H1,2 => HeaderLevel::H2,3 => HeaderLevel::H3,4 => HeaderLevel::H4,5 => HeaderLevel::H5,6 => HeaderLevel::H6,_ => panic!("Unexpected header level! Headers must be in range of 1 to 6 (inclusive), got: {}",value),}}} - edit in crates/typser/src/lib.rs at line 19
impl From<HeaderLevel> for &str {fn from(value: HeaderLevel) -> Self {match value {HeaderLevel::H1 => "h1",HeaderLevel::H2 => "h2",HeaderLevel::H3 => "h3",HeaderLevel::H4 => "h4",HeaderLevel::H5 => "h5",HeaderLevel::H6 => "h6",}}}