mirror of https://github.com/ChillFish8/lust.git
add original image preset to sizing_preset_ids if default preset is null (#15)
This commit is contained in:
parent
64c1fc2c5c
commit
259e88632f
|
@ -180,9 +180,13 @@ pub struct BucketConfig {
|
|||
impl BucketConfig {
|
||||
#[inline]
|
||||
pub fn sizing_preset_ids(&self) -> Vec<u32> {
|
||||
self.presets.keys()
|
||||
.map(crate::utils::crc_hash)
|
||||
.collect()
|
||||
let mut presets: Vec<u32> =
|
||||
self.presets.keys().map(crate::utils::crc_hash).collect();
|
||||
match self.default_serving_preset {
|
||||
None => presets.push(0),
|
||||
_ => ()
|
||||
}
|
||||
presets
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue