Skip to content

Commit e03d04d

Browse files
author
Nichol Yip
committed
Fix conflicts from rebase
1 parent 098e062 commit e03d04d

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

crates/spk-schema/src/metadata/meta.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::{Error, Lint, LintedItem, Lints, Result, UnknownKey};
1616
#[path = "./meta_test.rs"]
1717
mod meta_test;
1818

19-
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
19+
#[derive(Default, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
2020
pub struct Meta {
2121
#[serde(default, skip_serializing_if = "Option::is_none")]
2222
pub description: Option<String>,
@@ -107,7 +107,7 @@ impl From<MetaVisitor> for Meta {
107107
Self {
108108
description: value.description,
109109
homepage: value.homepage,
110-
license: value.license.unwrap_or(Meta::default_license()),
110+
license: value.license,
111111
labels: value.labels.unwrap_or_default(),
112112
}
113113
}

crates/spk-schema/src/spec.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,8 @@ impl Template for SpecTemplate {
162162

163163
fn render_to_string(&self, options: &OptionMap) -> Result<String> {
164164
let data = super::TemplateData::new(options);
165-
let rendered = spk_schema_tera::render_template(
166-
self.file_path.to_string_lossy(),
167-
&self.template,
168-
&data,
169-
)
170-
.map_err(Error::InvalidTemplate)?;
171-
Ok(SpecRecipe::from_yaml(rendered)?)
165+
spk_schema_tera::render_template(self.file_path.to_string_lossy(), &self.template, &data)
166+
.map_err(Error::InvalidTemplate)
172167
}
173168
}
174169

crates/spk-schema/src/v0/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ mod variant_spec;
1010

1111
pub use platform::Platform;
1212
pub use spec::Spec;
13-
pub use spec::{LintedSpec, Spec};
1413
pub use test_spec::TestSpec;
1514
pub use variant::Variant;
1615
pub use variant_spec::VariantSpec;

crates/spk-schema/src/v0/spec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use spk_schema_foundation::ident_build::BuildId;
1414
use spk_schema_foundation::ident_component::ComponentBTreeSet;
1515
use spk_schema_foundation::option_map::{OptFilter, Stringified};
1616
use spk_schema_foundation::version::IncompatibleReason;
17-
use spk_schema_foundation::option_map::Stringified;
1817
use spk_schema_ident::{AnyIdent, BuildIdent, Ident, RangeIdent, VersionIdent};
1918
use struct_field_names_as_array::FieldNamesAsArray;
2019

crates/spk-schema/src/v0/test_spec.rs

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// SPDX-License-Identifier: Apache-2.0
33
// https://github.com/spkenv/spk
44

5-
use ngrammatic::CorpusBuilder;
65
use serde::{Deserialize, Serialize};
76
use spk_schema_foundation::option_map::Stringified;
87
use struct_field_names_as_array::FieldNamesAsArray;

0 commit comments

Comments
 (0)