summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/workbook.rb
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-06-02 20:55:14 +0200
committerGeremia Taglialatela <[email protected]>2023-06-02 20:55:14 +0200
commit4195130bb4633bc667aeedd297dc56d7632a5810 (patch)
tree58a96dd864cc81c66c14499b6b6de40dbcd1d936 /lib/axlsx/workbook/workbook.rb
parentad87c51bf8c8f59a36514bb95dc6d3a582c6b2fd (diff)
downloadcaxlsx-4195130bb4633bc667aeedd297dc56d7632a5810.tar.gz
caxlsx-4195130bb4633bc667aeedd297dc56d7632a5810.zip
Fix negated if offenses
Should also provide a negligible performance improvement, about 3% on Ruby 3.2 and 6% on Ruby 2.6 (M1 Pro)
Diffstat (limited to 'lib/axlsx/workbook/workbook.rb')
-rw-r--r--lib/axlsx/workbook/workbook.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb
index e6e2f06f..271d4300 100644
--- a/lib/axlsx/workbook/workbook.rb
+++ b/lib/axlsx/workbook/workbook.rb
@@ -197,7 +197,7 @@ module Axlsx
# A helper to apply styles that were added using `worksheet.add_style`
# @return [Boolean]
def apply_styles
- return false if !styled_cells
+ return false unless styled_cells
styled_cells.each do |cell|
current_style = styles.style_index[cell.style]