fix some clippy lint warnings

This commit is contained in:
Skgland
2021-02-06 19:45:21 +01:00
parent 64433bd8dd
commit 9107b3ddbe
4 changed files with 65 additions and 66 deletions

View File

@@ -104,7 +104,7 @@ impl<T: Hash + Eq> Hash for TabledRc<T> {
impl<T: Hash + Eq + ToString> TabledRc<T> {
pub fn new(atom: T, table: TabledData<T>) -> Self {
let atom = match table.borrow_mut().take(&atom) {
Some(atom) => atom.clone(),
Some(atom) => atom,
None => Rc::new(atom),
};