lib: remove useless usage of `is`
authorJean Privat <jean@pryen.org>
Tue, 26 Nov 2013 19:58:18 +0000 (14:58 -0500)
committerJean Privat <jean@pryen.org>
Tue, 26 Nov 2013 19:58:18 +0000 (14:58 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/collection/abstract_collection.nit
lib/standard/string.nit

index 8d5cb80..ab04618 100644 (file)
@@ -443,7 +443,7 @@ interface SequenceRead[E]
        # Two sequences are equals if they have the same items in the same order.
        redef fun ==(o)
        do
-               if not o isa SequenceRead[nullable Object] or o is null then return false
+               if not o isa SequenceRead[nullable Object] then return false
                var l = length
                if o.length != l then return false
                var i = 0
index 4010b81..e159dfc 100644 (file)
@@ -543,7 +543,7 @@ class String
 
        redef fun ==(other)
        do
-               if not other isa String or other is null then return false
+               if not other isa String then return false
 
                if self.object_id == other.object_id then return true
 
@@ -785,7 +785,7 @@ class Buffer
 
        redef fun ==(o)
        do
-               if not o isa Buffer or o is null then return false
+               if not o isa Buffer then return false
                var l = length
                if o.length != l then return false
                var i = 0