Skip to content

Commit 7b8880a

Browse files
committed
Remove commented code blocks
Signed-off-by: Sebastian Ziebell <[email protected]>
1 parent b0859e0 commit 7b8880a

File tree

1 file changed

+0
-61
lines changed

1 file changed

+0
-61
lines changed

cyclonedx-bom/src/specs/v1_3/component.rs

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,6 @@ use xml::{reader, writer::XmlEvent};
5050
#[serde(transparent)]
5151
pub(crate) struct Components(Vec<Component>);
5252

53-
/*
54-
impl From<models::component::Components> for Components {
55-
fn from(other: models::component::Components) -> Self {
56-
Components(try_convert_vec(other.0))
57-
}
58-
}
59-
*/
60-
6153
impl TryFrom<models::component::Components> for Components {
6254
type Error = BomError;
6355

@@ -169,44 +161,6 @@ pub(crate) struct Component {
169161
evidence: Option<ComponentEvidence>,
170162
}
171163

172-
/*
173-
impl From<models::component::Component> for Component {
174-
fn from(other: models::component::Component) -> Self {
175-
Self {
176-
component_type: other.component_type.to_string(),
177-
mime_type: other.mime_type.map(|m| MimeType(m.0)),
178-
bom_ref: other.bom_ref,
179-
supplier: convert_optional(other.supplier),
180-
author: other.author.map(|a| a.to_string()),
181-
publisher: other.publisher.map(|p| p.to_string()),
182-
group: other.group.map(|g| g.to_string()),
183-
name: other.name.to_string(),
184-
version: {
185-
// todo: setting version to None is just an interims fix until we decided which way to go for implementing conversion errors
186-
match other.version {
187-
None => "None".to_string(),
188-
Some(version) => version.to_string(),
189-
}
190-
},
191-
description: other.description.map(|d| d.to_string()),
192-
scope: other.scope.map(|s| s.to_string()),
193-
hashes: convert_optional(other.hashes),
194-
licenses: convert_optional(other.licenses),
195-
copyright: other.copyright.map(|c| c.to_string()),
196-
cpe: convert_optional(other.cpe),
197-
purl: other.purl.map(|p| p.0),
198-
swid: convert_optional(other.swid),
199-
modified: other.modified,
200-
pedigree: convert_optional(other.pedigree),
201-
external_references: convert_optional(other.external_references),
202-
properties: convert_optional(other.properties),
203-
components: convert_optional(other.components),
204-
evidence: convert_optional(other.evidence),
205-
}
206-
}
207-
}
208-
*/
209-
210164
impl TryFrom<models::component::Component> for Component {
211165
type Error = BomError;
212166

@@ -928,21 +882,6 @@ struct Pedigree {
928882
notes: Option<String>,
929883
}
930884

931-
/*
932-
impl From<models::component::Pedigree> for Pedigree {
933-
fn from(other: models::component::Pedigree) -> Self {
934-
Self {
935-
ancestors: convert_optional(other.ancestors),
936-
descendants: convert_optional(other.descendants),
937-
variants: convert_optional(other.variants),
938-
commits: convert_optional(other.commits),
939-
patches: convert_optional(other.patches),
940-
notes: other.notes,
941-
}
942-
}
943-
}
944-
*/
945-
946885
impl TryFrom<models::component::Pedigree> for Pedigree {
947886
type Error = BomError;
948887

0 commit comments

Comments
 (0)