Skip to content

Commit fc93961

Browse files
committed
deduplicate code
Signed-off-by: Christian Poveda <[email protected]>
1 parent cf602cd commit fc93961

9 files changed

+6
-1133
lines changed

cyclonedx-bom/src/specs/v1_3/code.rs renamed to cyclonedx-bom/src/specs/common/code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{
2020
errors::XmlReadError,
2121
external_models::{date_time::DateTime, normalized_string::NormalizedString, uri::Uri},
2222
models,
23-
specs::v1_3::attached_text::AttachedText,
23+
specs::common::attached_text::AttachedText,
2424
utilities::{convert_optional, convert_optional_vec, convert_vec},
2525
xml::{
2626
attribute_or_error, read_lax_validation_list_tag, read_lax_validation_tag, read_list_tag,

cyclonedx-bom/src/specs/common/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pub(crate) mod attached_text;
2+
pub(crate) mod code;
23
pub(crate) mod dependency;
34
pub(crate) mod hash;
45
pub(crate) mod organization;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
source: cyclonedx-bom/src/specs/v1_4/code.rs
2+
source: cyclonedx-bom/src/specs/common/code.rs
33
expression: xml_output
44
---
55
<?xml version="1.0" encoding="utf-8"?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
source: cyclonedx-bom/src/specs/v1_4/code.rs
2+
source: cyclonedx-bom/src/specs/common/code.rs
33
expression: xml_output
44
---
55
<?xml version="1.0" encoding="utf-8"?>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818

1919
pub(crate) mod bom;
20-
pub(crate) mod code;
2120
pub(crate) mod component;
2221
pub(crate) mod composition;
2322
pub(crate) mod external_reference;
@@ -26,4 +25,4 @@ pub(crate) mod metadata;
2625
pub(crate) mod service;
2726
pub(crate) mod tool;
2827

29-
pub(crate) use super::common::{attached_text, dependency, hash, organization, property};
28+
pub(crate) use super::common::{attached_text, code, dependency, hash, organization, property};

cyclonedx-bom/src/specs/v1_3/snapshots/cyclonedx_bom__specs__v1_3__code__test__it_should_write_commits_xml_full.snap

Lines changed: 0 additions & 24 deletions
This file was deleted.

cyclonedx-bom/src/specs/v1_3/snapshots/cyclonedx_bom__specs__v1_3__code__test__it_should_write_patches_xml_full.snap

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)