]> git.openstreetmap.org Git - rails.git/blobdiff - lib/diff_reader.rb
Remove temorary routes
[rails.git] / lib / diff_reader.rb
index 94c41a6d57751be96c3497fb99ffefb7d85e4229..cb553bfbcad71a095c0940f61b3fb5341d1d4712 100644 (file)
@@ -60,9 +60,7 @@ class DiffReader
           attributes = {}
 
           if @reader.has_attributes?
-            while @reader.move_to_next_attribute == 1
-              attributes[@reader.name] = @reader.value
-            end
+            attributes[@reader.name] = @reader.value while @reader.move_to_next_attribute == 1
 
             @reader.move_to_element
           end
@@ -112,9 +110,7 @@ class DiffReader
   # such as save_ and delete_with_history.
   def check(model, xml, new)
     raise OSM::APIBadXMLError.new(model, xml) if new.nil?
-    unless new.changeset_id == @changeset.id
-      raise OSM::APIChangesetMismatchError.new(new.changeset_id, @changeset.id)
-    end
+    raise OSM::APIChangesetMismatchError.new(new.changeset_id, @changeset.id) unless new.changeset_id == @changeset.id
   end
 
   ##