Optimizations (#676)

This commit is contained in:
Geometrically
2023-08-07 23:05:08 -07:00
committed by GitHub
parent f21c756793
commit df83fcc5b9
15 changed files with 278 additions and 244 deletions

View File

@@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize};
const PROJECTS_NAMESPACE: &str = "projects";
const PROJECTS_SLUGS_NAMESPACE: &str = "projects_slugs";
const PROJECTS_DEPENDENCIES_NAMESPACE: &str = "projects_dependencies";
const DEFAULT_EXPIRY: i64 = 3600; // 60 minutes
const DEFAULT_EXPIRY: i64 = 1800; // 30 minutes
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct DonationUrl {
@@ -524,7 +524,8 @@ impl Project {
{
remaining_strings.retain(|x| {
&to_base62(project.inner.id.0 as u64) != x
&& project.inner.slug.as_ref() != Some(x)
&& project.inner.slug.as_ref().map(|x| x.to_lowercase())
!= Some(x.to_lowercase())
});
found_projects.push(project);
continue;