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 24a9374
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 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
4 changes: 2 additions & 2 deletions tsparser/src/parser/usageparser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export const Bar = 5;
streaming_request: false,
streaming_response: false,
static_assets: None,
tags: None,
tags: vec![],
}));

let bar_binds = vec![Lrc::new(Bind {
Expand Down Expand Up @@ -654,7 +654,7 @@ export const Bar = 5;
streaming_request: false,
streaming_response: false,
static_assets: None,
tags: None,
tags: vec![],
}));
let bar_binds = vec![Lrc::new(Bind {
kind: BindKind::Create,
Expand Down

0 comments on commit 24a9374

Please sign in to comment.