add an index page and add name functions to the API and cache busting #7

Merged
mossfet merged 7 commits from index-page into main 2023-07-11 11:08:08 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 74f3cd1cb4 - Show all commits

View file

@ -8,7 +8,7 @@ edition = "2021"
rust-version = "1.70"
[profile.dev]
lto = "thin"
lto = false
[profile.release]
lto = "thin"

View file

@ -33,7 +33,7 @@ pub fn previous_name(source_url: &String, names: &Vec<Site>) -> Option<String> {
pub fn next_name(source_url: &String, names: &Vec<Site>) -> Option<String> {
match names.iter().position(|r| &r.url == source_url) {
Some(index) if index == names.len() - 1 => match &names[names.len() - 1].name {
Some(index) if index == names.len() - 1 => match &names[0].name {
Some(name) => Some(name.clone()),
None => next_url(source_url, names),
},