Skip to content

Commit a4b6a65

Browse files
committed
added question link in daily challenge prompt
1 parent 6af52a6 commit a4b6a65

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/handlers/helpers.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,19 @@ impl fmt::Display for DailyChallenge {
117117
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
118118
write!(
119119
f,
120-
"{title_txt:12}: {}\n{diff:12}: {}\n{date:12}: {}\n{status:12}: {}\n{ac_rate:12}: {:.2}%",
120+
"{title_txt:12}: {}\n{diff:12}: {}\n{date:12}: {}\n{status:12}: {}\n{ac_rate:12}: {:.2}%\n{link:12}: https://leetcode.com{}",
121121
self.question.title.bright_cyan(),
122122
Difficulty::from_str(&self.question.difficulty).map_err(|_| fmt::Error)?,
123123
self.date,
124124
self.userStatus,
125-
self.question.acRate
126-
, title_txt = "Title", diff = "Difficulty", ac_rate = "AC Rate",
127-
date = "Date", status = "Status"
125+
self.question.acRate,
126+
self.link,
127+
title_txt = "Title",
128+
diff = "Difficulty",
129+
ac_rate = "AC Rate",
130+
date = "Date",
131+
status = "Status",
132+
link = "Link",
128133
)
129134
}
130135
}

0 commit comments

Comments
 (0)