Skip to content

Commit

Permalink
Simplify Dice::plain
Browse files Browse the repository at this point in the history
  • Loading branch information
Gawdl3y committed Mar 12, 2024
1 parent 1d06371 commit af02e11
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/dice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use fastrand::Rng;

use crate::term::Describe;

/// Representation of a set of dice that can be rolled
/// A single set of rollable dice and a collection of modifiers to apply to any [Rolled] results produced by it.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct Dice {
/// Number of dice to roll
Expand Down Expand Up @@ -52,11 +52,7 @@ impl Dice {

/// Gets a new set of Dice matching this one but without any modifiers
pub fn plain(&self) -> Self {
Dice {
count: self.count,
sides: self.sides,
modifiers: Vec::new(),
}
Self::new(self.count, self.sides)
}

/// Creates a new set of dice with a given count and number of sides
Expand Down

0 comments on commit af02e11

Please sign in to comment.