[types] Simplify explicit lifetimes for Int::eq(Obj)
This commit is contained in:
parent
576b81e52c
commit
f18b6a5719
1 changed files with 1 additions and 3 deletions
|
@ -18,9 +18,7 @@ impl Number for Int {
|
|||
|
||||
impl PartialEq<Obj> for Int {
|
||||
fn eq<'a>(&self, rhs: &'a Obj) -> bool {
|
||||
let obj: Option<&'a Object> = rhs.obj();
|
||||
let num: Option<&'a Number> = obj.and_then(Object::as_num);
|
||||
match num {
|
||||
match rhs.obj().and_then(Object::as_num) {
|
||||
Some(num) => self == num,
|
||||
None => false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue