File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ impl Level {
171171 match self {
172172 Self :: Fastest => params. quality = 0 ,
173173 Self :: Best => params. quality = 11 ,
174- Self :: Precise ( quality) => params. quality = quality. min ( 11 ) ,
174+ Self :: Precise ( quality) => params. quality = quality. clamp ( 0 , 11 ) ,
175175 Self :: Default => ( ) ,
176176 }
177177
@@ -190,7 +190,7 @@ impl Level {
190190 quality
191191 . try_into ( )
192192 . unwrap_or ( 0 )
193- . clamp ( fastest. level ( ) , best. level ( ) )
193+ . clamp ( fastest. level ( ) , best. level ( ) ) ,
194194 ) ,
195195 Self :: Default => bzip2:: Compression :: default ( ) ,
196196 }
@@ -208,7 +208,7 @@ impl Level {
208208 quality
209209 . try_into ( )
210210 . unwrap_or ( 0 )
211- . clamp ( fastest. level ( ) , best. level ( ) )
211+ . clamp ( fastest. level ( ) , best. level ( ) ) ,
212212 ) ,
213213 Self :: Default => flate2:: Compression :: default ( ) ,
214214 }
You can’t perform that action at this time.
0 commit comments