style: cargo fmt --all
This commit is contained in:
@@ -56,7 +56,9 @@ impl Asset {
|
||||
|
||||
// --- AssetMetadata ---
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize)]
|
||||
#[derive(
|
||||
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize,
|
||||
)]
|
||||
pub enum MetadataSource {
|
||||
ExifExtracted,
|
||||
AiGenerated,
|
||||
@@ -133,7 +135,11 @@ impl AssetStack {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_member(&mut self, asset_id: SystemId, role: StackMemberRole) -> Result<(), DomainError> {
|
||||
pub fn add_member(
|
||||
&mut self,
|
||||
asset_id: SystemId,
|
||||
role: StackMemberRole,
|
||||
) -> Result<(), DomainError> {
|
||||
if self.members.iter().any(|m| m.asset_id == asset_id) {
|
||||
return Err(DomainError::Conflict(
|
||||
"Asset already exists in stack".to_string(),
|
||||
@@ -179,7 +185,11 @@ pub struct DerivativeAsset {
|
||||
}
|
||||
|
||||
impl DerivativeAsset {
|
||||
pub fn new_pending(parent: SystemId, profile: DerivativeProfile, path: impl Into<String>) -> Self {
|
||||
pub fn new_pending(
|
||||
parent: SystemId,
|
||||
profile: DerivativeProfile,
|
||||
path: impl Into<String>,
|
||||
) -> Self {
|
||||
Self {
|
||||
derivative_id: SystemId::new(),
|
||||
parent_asset_id: parent,
|
||||
@@ -239,8 +249,14 @@ impl DuplicateGroup {
|
||||
detection_method: DetectionMethod::ExactHash,
|
||||
status: DuplicateStatus::Unresolved,
|
||||
candidates: vec![
|
||||
DuplicateCandidate { asset_id: asset_a, similarity_score: 1.0 },
|
||||
DuplicateCandidate { asset_id: asset_b, similarity_score: 1.0 },
|
||||
DuplicateCandidate {
|
||||
asset_id: asset_a,
|
||||
similarity_score: 1.0,
|
||||
},
|
||||
DuplicateCandidate {
|
||||
asset_id: asset_b,
|
||||
similarity_score: 1.0,
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user