Skip to content

Commit

Permalink
refactor: Rename to RuleExt
Browse files Browse the repository at this point in the history
  • Loading branch information
dandxy89 committed Nov 11, 2023
1 parent eb3edd7 commit 0d80542
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/common.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use crate::Rule;
use pest::iterators::Pair;

pub trait Filterable {
pub trait RuleExt {
fn is_numeric(&self) -> bool;
fn is_cmp(&self) -> bool;
}

impl Filterable for Rule {
impl RuleExt for Rule {
fn is_numeric(&self) -> bool {
matches!(self, Self::FLOAT | Self::PLUS | Self::MINUS | Self::POS_INFINITY | Self::NEG_INFINITY)
}
Expand Down
2 changes: 1 addition & 1 deletion src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::{hash_map::Entry, HashMap};
use pest::iterators::Pairs;

use crate::{
common::{AsFloat, Filterable},
common::{AsFloat, RuleExt},
Rule,
};

Expand Down
2 changes: 1 addition & 1 deletion src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
};

use crate::{
common::Filterable,
common::RuleExt,
model::{Constraint, LPDefinition, Objective, Sense, VariableType},
LParser, Rule,
};
Expand Down

0 comments on commit 0d80542

Please sign in to comment.