Skip to content

Commit

Permalink
Avoid useless iteration over features on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
jastkand committed Jul 8, 2016
1 parent c5a2baf commit cc78036
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rollout.rb
Expand Up @@ -122,8 +122,8 @@ def deactivate(feature)
end

def delete(feature)
features = (@storage.get(features_key) || "").split(",").map(&:to_sym)
features.delete(feature.to_sym)
features = (@storage.get(features_key) || "").split(",")
features.delete(feature.to_s)
@storage.set(features_key, features.join(","))
@storage.del(key(feature))
end
Expand Down

0 comments on commit cc78036

Please sign in to comment.