Skip to content

Commit 4a4c8ed

Browse files
committed
more descriptive names for fields
1 parent ca29a21 commit 4a4c8ed

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

mdbook-goals/src/goal.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ pub struct TeamAsk {
5959
pub link_path: Arc<PathBuf>,
6060

6161
/// What the team is being asked for (e.g., RFC decision)
62-
pub subgoal: String,
62+
pub ask_description: String,
6363

6464
/// Title of the subgoal (or goal, if there are no subgoals)
65-
pub heading: String,
65+
pub subgoal_title: String,
6666

6767
/// Name(s) of the teams being asked to do the thing
6868
pub teams: Vec<&'static TeamName>,
@@ -142,7 +142,10 @@ pub fn format_team_asks(asks_of_any_team: &[&TeamAsk]) -> anyhow::Result<String>
142142
let team_data = team_name.data();
143143
write!(output, "\n### {} team\n", team_data.name)?;
144144

145-
let subgoals: BTreeSet<&String> = asks_of_this_team.iter().map(|a| &a.subgoal).collect();
145+
let subgoals: BTreeSet<&String> = asks_of_this_team
146+
.iter()
147+
.map(|a| &a.ask_description)
148+
.collect();
146149

147150
let mut table = vec![vec![
148151
"Goal".to_string(),
@@ -157,12 +160,15 @@ pub fn format_team_asks(asks_of_any_team: &[&TeamAsk]) -> anyhow::Result<String>
157160
"".to_string(),
158161
]);
159162

160-
for ask in asks_of_this_team.iter().filter(|a| a.subgoal == *subgoal) {
163+
for ask in asks_of_this_team
164+
.iter()
165+
.filter(|a| a.ask_description == *subgoal)
166+
{
161167
table.push(vec![
162168
format!(
163169
"{} [{}]({}#ownership-and-team-asks)",
164170
ARROW,
165-
ask.heading,
171+
ask.subgoal_title,
166172
ask.link_path.display()
167173
),
168174
ask.owners.to_string(),
@@ -386,8 +392,8 @@ impl PlanItem {
386392
if !teams.is_empty() {
387393
asks.push(TeamAsk {
388394
link_path: link_path.clone(),
389-
subgoal: self.text.clone(),
390-
heading: goal_title.to_string(),
395+
ask_description: self.text.clone(),
396+
subgoal_title: goal_title.to_string(),
391397
teams,
392398
owners: goal_owners.to_string(),
393399
notes: self.notes.clone(),
@@ -476,12 +482,12 @@ fn extract_team_asks<'i>(
476482

477483
tasks.push(TeamAsk {
478484
link_path: link_path.clone(),
479-
heading: if subgoal == heading {
485+
subgoal_title: if subgoal == heading {
480486
metadata.short_title.to_string()
481487
} else {
482488
heading.to_string()
483489
},
484-
subgoal: subgoal.to_string(),
490+
ask_description: subgoal.to_string(),
485491
teams,
486492
owners: owners.to_string(),
487493
notes: row[2].to_string(),

0 commit comments

Comments
 (0)