From: Jean Privat Date: Tue, 26 Nov 2013 19:58:18 +0000 (-0500) Subject: lib: remove useless usage of `is` X-Git-Tag: v0.6.4~58^2~8^2~9 X-Git-Url: http://nitlanguage.org lib: remove useless usage of `is` Signed-off-by: Jean Privat --- diff --git a/lib/standard/collection/abstract_collection.nit b/lib/standard/collection/abstract_collection.nit index 8d5cb80..ab04618 100644 --- a/lib/standard/collection/abstract_collection.nit +++ b/lib/standard/collection/abstract_collection.nit @@ -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 diff --git a/lib/standard/string.nit b/lib/standard/string.nit index 4010b81..e159dfc 100644 --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@ -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