Skip to content

Commit

Permalink
Fix conflicts from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Nichol Yip committed Aug 27, 2024
1 parent 098e062 commit e03d04d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions crates/spk-schema/src/metadata/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{Error, Lint, LintedItem, Lints, Result, UnknownKey};
#[path = "./meta_test.rs"]
mod meta_test;

#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
#[derive(Default, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, Serialize)]
pub struct Meta {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
Expand Down Expand Up @@ -107,7 +107,7 @@ impl From<MetaVisitor> for Meta {
Self {
description: value.description,
homepage: value.homepage,
license: value.license.unwrap_or(Meta::default_license()),
license: value.license,
labels: value.labels.unwrap_or_default(),
}
}
Expand Down
9 changes: 2 additions & 7 deletions crates/spk-schema/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,8 @@ impl Template for SpecTemplate {

fn render_to_string(&self, options: &OptionMap) -> Result<String> {
let data = super::TemplateData::new(options);
let rendered = spk_schema_tera::render_template(
self.file_path.to_string_lossy(),
&self.template,
&data,
)
.map_err(Error::InvalidTemplate)?;
Ok(SpecRecipe::from_yaml(rendered)?)
spk_schema_tera::render_template(self.file_path.to_string_lossy(), &self.template, &data)
.map_err(Error::InvalidTemplate)
}
}

Expand Down
1 change: 0 additions & 1 deletion crates/spk-schema/src/v0/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ mod variant_spec;

pub use platform::Platform;
pub use spec::Spec;
pub use spec::{LintedSpec, Spec};
pub use test_spec::TestSpec;
pub use variant::Variant;
pub use variant_spec::VariantSpec;
1 change: 0 additions & 1 deletion crates/spk-schema/src/v0/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use spk_schema_foundation::ident_build::BuildId;
use spk_schema_foundation::ident_component::ComponentBTreeSet;
use spk_schema_foundation::option_map::{OptFilter, Stringified};
use spk_schema_foundation::version::IncompatibleReason;
use spk_schema_foundation::option_map::Stringified;
use spk_schema_ident::{AnyIdent, BuildIdent, Ident, RangeIdent, VersionIdent};
use struct_field_names_as_array::FieldNamesAsArray;

Expand Down
1 change: 0 additions & 1 deletion crates/spk-schema/src/v0/test_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0
// https://github.com/spkenv/spk

use ngrammatic::CorpusBuilder;
use serde::{Deserialize, Serialize};
use spk_schema_foundation::option_map::Stringified;
use struct_field_names_as_array::FieldNamesAsArray;
Expand Down

0 comments on commit e03d04d

Please sign in to comment.