fix unecessary reference/dereference
This commit is contained in:
committed by
Bennet Bleßmann
parent
72631b3e0b
commit
ae3019d923
@@ -858,9 +858,9 @@ impl Term {
|
||||
}
|
||||
|
||||
pub fn name(&self) -> Option<Atom> {
|
||||
match self {
|
||||
&Term::Literal(_, Literal::Atom(atom)) => Some(atom),
|
||||
&Term::Clause(_, atom, ..) => Some(atom),
|
||||
match *self {
|
||||
Term::Literal(_, Literal::Atom(atom)) => Some(atom),
|
||||
Term::Clause(_, atom, ..) => Some(atom),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ pub(crate) fn as_partial_string(
|
||||
tail_ref = tail;
|
||||
}
|
||||
Term::CompleteString(_, cstr) => {
|
||||
string += &*cstr.as_str();
|
||||
string += cstr.as_str();
|
||||
tail = Term::Literal(Cell::default(), Literal::Atom(atom!("[]")));
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user