Skip to content

Commit 9c20b32

Browse files
committed
fix use of VariantName
1 parent fb597b8 commit 9c20b32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::collections::BTreeSet;
2424
use std::fmt::{Debug, Display};
2525
use std::marker::PhantomData;
2626

27-
use crate::{FieldName, LibName, TypeName, VariantName};
27+
use crate::{LibName, TypeName, VariantName};
2828

2929
#[derive(Clone, Eq, PartialEq, Debug, Display, Error)]
3030
#[display("unexpected variant {1} for enum or union {0:?}")]
@@ -195,7 +195,7 @@ where
195195
Self: StrictSum + Copy + TryFrom<u8, Error = VariantError<u8>>,
196196
u8: From<Self>,
197197
{
198-
fn from_variant_name(name: &FieldName) -> Result<Self, VariantError<&FieldName>> {
198+
fn from_variant_name(name: &VariantName) -> Result<Self, VariantError<&VariantName>> {
199199
for (tag, n) in Self::ALL_VARIANTS {
200200
if *n == name.as_str() {
201201
return Self::try_from(*tag).map_err(|_| VariantError(Self::strict_name(), name));

0 commit comments

Comments
 (0)