Skip to content

Commit

Permalink
Removing a function which is kinda useless and widening a test
Browse files Browse the repository at this point in the history
  • Loading branch information
spacekookie committed Oct 26, 2017
1 parent 6c0b16e commit 0448a85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/terms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@ impl PartialEq for Term {


impl Term {
/// Very simple constructor that initialises a term with one symbol
pub fn new(symbol: Symbol) -> Term {
let mut t = Term {
symbols: Vec::new(),
};

t.symbols.push(symbol);
return t;
}

/// Simple linear `contains` function for a Term. Avoid using this
/// as it can lead to high runtimes on longer terms.
Expand Down
4 changes: 4 additions & 0 deletions src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ mod tests {
assert!(term.contains(&symbol!["A"]));
assert!(term.contains(&symbol!["!A"]));
assert!(term.contains(&symbol!["B"]));

/* Fail an insert */
term.insert(symbol!["B"]);
assert!(term.contains(&symbol!["B"]));
}

#[test]
Expand Down

0 comments on commit 0448a85

Please sign in to comment.