Skip to content

Commit

Permalink
Make enums non_exhaustive
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmehall committed Jul 11, 2020
1 parent 5a6d379 commit 97dde6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ impl Display for Value {

/// A type of scope, as used in the `$scope` command.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[non_exhaustive]
pub enum ScopeType {
Module,
Task,
Expand Down Expand Up @@ -290,6 +291,7 @@ impl Display for ScopeType {

/// A type of variable, as used in the `$var` command.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[non_exhaustive]
pub enum VarType {
Event,
Integer,
Expand Down Expand Up @@ -468,6 +470,7 @@ pub enum ScopeItem {

/// An element in a VCD file.
#[derive(Debug, PartialEq, Clone)]
#[non_exhaustive]
pub enum Command {
/// A `$comment` command
Comment(String),
Expand Down Expand Up @@ -519,6 +522,7 @@ pub enum Command {

/// A simulation command type, used in `Command::Begin` and `Command::End`.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[non_exhaustive]
pub enum SimulationCommand {
Dumpall,
Dumpoff,
Expand All @@ -544,6 +548,7 @@ impl Display for SimulationCommand {

/// Structure containing the data from the header of a VCD file.
#[derive(Debug, Default)]
#[non_exhaustive]
pub struct Header {
pub comment: Option<String>,
pub date: Option<String>,
Expand Down

0 comments on commit 97dde6b

Please sign in to comment.