1
0
Fork 0
mirror of https://codeberg.org/icewind/bitbuffer.git synced 2026-06-04 00:54:07 +02:00

update syn and friends to 1.0

This commit is contained in:
Robin Appelman 2020-01-08 12:49:01 +01:00
commit 112e95cd74
2 changed files with 6 additions and 6 deletions

View file

@ -515,7 +515,7 @@ enum Discriminant {
impl From<Lit> for Discriminant {
fn from(lit: Lit) -> Self {
match lit {
Lit::Int(lit) => Discriminant::Int(lit.value() as usize),
Lit::Int(lit) => Discriminant::Int(lit.base10_parse::<usize>().unwrap()),
Lit::Str(lit) => match lit.value().as_str() {
"_" => Discriminant::Wildcard,
_ => panic!("discriminant is required to be an integer literal or \"_\""),