mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
Add #[cfg(test)] for Transition in dfa
This commit is contained in:
@@ -55,6 +55,7 @@ fn insert(&mut self, transition: Transition<R>, state: State) {
|
||||
#[derive(Hash, Eq, PartialEq, PartialOrd, Ord, Copy, Clone)]
|
||||
pub(crate) struct State(u32);
|
||||
|
||||
#[cfg(test)]
|
||||
#[derive(Hash, Eq, PartialEq, Clone, Copy)]
|
||||
pub(crate) enum Transition<R>
|
||||
where
|
||||
@@ -70,6 +71,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl<R> fmt::Debug for Transition<R>
|
||||
where
|
||||
R: Ref,
|
||||
@@ -166,6 +168,7 @@ pub(crate) fn new() -> Self {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
impl<R> From<nfa::Transition<R>> for Transition<R>
|
||||
where
|
||||
R: Ref,
|
||||
|
||||
Reference in New Issue
Block a user