diff --git a/persistence/models/mongo-models/src/ceobe/operation/version/models/conv.rs b/persistence/models/mongo-models/src/ceobe/operation/version/models/conv.rs index 445bf1de..1cd6255f 100644 --- a/persistence/models/mongo-models/src/ceobe/operation/version/models/conv.rs +++ b/persistence/models/mongo-models/src/ceobe/operation/version/models/conv.rs @@ -41,12 +41,10 @@ impl From for ReleaseVersion { .description(description) .platform(Plugin) .previous_mandatory_version(Version::new( - major as _, - minor as _, - security as _, - )) - - + major as _, + minor as _, + security as _, + )) .add_download_source( DownloadSourceItem::builder() .name("CRX") @@ -119,16 +117,16 @@ impl From for ReleaseVersion { apk, spare_apk, baidu, - baidu_text,.. + baidu_text, + .. }: app_version::Checked, ) -> Self { ReleaseVersion::builder() // 经过校验的version,没有问题 .version(version.parse().unwrap_or_log()) .previous_mandatory_version( - last_force_version.parse().unwrap_or_log(), - ) - + last_force_version.parse().unwrap_or_log(), + ) .platform(Pocket) .description(description) .add_download_source( @@ -175,16 +173,16 @@ impl From for ReleaseVersion { dmg, spare_dmg, baidu, - baidu_text,.. + baidu_text, + .. }: desktop_version::Checked, ) -> Self { ReleaseVersion::builder() // 经过校验的version,没有问题 .version(version.parse().unwrap_or_log()) .previous_mandatory_version( - last_force_version.parse().unwrap_or_log(), - ) - + last_force_version.parse().unwrap_or_log(), + ) .platform(Desktop) .description(description) .add_download_source( diff --git a/persistence/models/mongo-models/src/ceobe/operation/version/models/version.rs b/persistence/models/mongo-models/src/ceobe/operation/version/models/version.rs index 4120f060..667d976c 100644 --- a/persistence/models/mongo-models/src/ceobe/operation/version/models/version.rs +++ b/persistence/models/mongo-models/src/ceobe/operation/version/models/version.rs @@ -3,8 +3,7 @@ use serde::{Deserialize, Serialize}; use typed_builder::TypedBuilder; use crate::ceobe::operation::version::models::{ - download_source::DownloadSourceItem, - platform::ReleasePlatform, + download_source::DownloadSourceItem, platform::ReleasePlatform, }; #[derive(Debug, Serialize, Deserialize, Clone, TypedBuilder, PartialEq)] @@ -56,9 +55,7 @@ mod test { fn test_version_serde() { let ver = ReleaseVersion::builder() .version(Version::new(1, 13, 2)) - .previous_mandatory_version( - Version::new(1, 0, 0) - ) + .previous_mandatory_version(Version::new(1, 0, 0)) .description("Abc") .platform(ReleasePlatform::Desktop) .add_download_source( @@ -88,9 +85,9 @@ mod test { .name("百度云备用") .build(), ) - .build(), - ).deleted(false) + ) + .deleted(false) .build(); let serde =