Skip to content

Commit

Permalink
Merge pull request #603 from atcupps/clippyfix
Browse files Browse the repository at this point in the history
Move regex to satisfy clippy
  • Loading branch information
atcupps authored Jan 30, 2025
2 parents 834d595 + 196a651 commit 1f2d102
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datagen/data/departments.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion datagen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ pub fn sections_info(

// Iterate through `section_numbers` and append corresponding `Section`
// data to `result`.
let re = Regex::new(r"<a.+>(.+)</a>").unwrap();
for (i, section_code) in section_numbers.iter().enumerate() {
let nth_child = i + 1;

Expand All @@ -264,7 +265,6 @@ pub fn sections_info(
let inner = x.inner_html();
// Some instructors have their names associated with an anchor
if inner.contains("<a") {
let re = Regex::new(r"<a.+>(.+)</a>").unwrap();
String::from(re.captures(&inner).unwrap().get(1).unwrap().as_str())
} else {
inner
Expand Down

0 comments on commit 1f2d102

Please sign in to comment.