Skip to content

Commit 349860b

Browse files
committed
feat: add category to project struct
1 parent bd548d0 commit 349860b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn generate_projects(path: PathBuf) {
151151
"use crate::models::ProjectItem;\npub const COMUNITY_PROJECTS: &[ProjectItem] = &[\n"
152152
)
153153
.unwrap();
154-
for (_c, _p, t) in projects {
154+
for (c, _p, t) in projects {
155155
let ProjectItem {
156156
name,
157157
description,
@@ -167,6 +167,7 @@ fn generate_projects(path: PathBuf) {
167167
r#"
168168
ProjectItem {{
169169
name: &{name:?},
170+
category: "{c}",
170171
description: "{description}",
171172
link: "{link}",
172173
brand_src: "{brand_src}",

src/models/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub struct CommunityItem {
88
}
99
pub struct ProjectItem {
1010
pub name: &'static [&'static str],
11+
pub category: &'static str,
1112
pub description: &'static str,
1213
pub link: &'static str,
1314
pub brand_src: &'static str,

0 commit comments

Comments
 (0)