Skip to content

Commit

Permalink
tsparser: make tags non-nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
eandre committed Jan 21, 2025
1 parent 019677f commit 2b93ed1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions tsparser/src/legacymeta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ impl MetaBuilder<'_> {

let tags = ep
.tags
.as_ref()
.unwrap_or(&vec![])
.iter()
.map(|tag| Selector {
r#type: selector::Type::Tag.into(),
Expand Down
4 changes: 2 additions & 2 deletions tsparser/src/parser/resources/apis/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct Endpoint {
pub expose: bool,
pub raw: bool,
pub require_auth: bool,
pub tags: Option<Vec<String>>,
pub tags: Vec<String>,

/// Body limit in bytes.
/// None means no limit.
Expand Down Expand Up @@ -375,7 +375,7 @@ pub const ENDPOINT_PARSER: ResourceParser = ResourceParser {
static_assets,
body_limit,
encoding,
tags: cfg.tags,
tags: cfg.tags.unwrap_or_default(),
}));

pass.add_resource(resource.clone());
Expand Down

0 comments on commit 2b93ed1

Please sign in to comment.