You've already forked AstralRinth
forked from didirus/AstralRinth
Taplo and typos in CI, TOML cleanup (#4510)
* Taplo and typos in CI * Clean up Cargo.toml files * Fix CI * Fix CI * Run typos in CI * Loosen typos a bit * Fix typos * Fix taplo * Switch to Tombi * Fix Tombi errors * Remove unused typos config * Tombi fmt * Remove extraneous cargo fmt * fix typos
This commit is contained in:
@@ -20,7 +20,7 @@ use validator::Validate;
|
||||
/// A project returned from the API
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub struct LegacyProject {
|
||||
/// Relevant V2 fields- these were removed or modfified in V3,
|
||||
/// Relevant V2 fields- these were removed or modified in V3,
|
||||
/// and are now part of the dynamic fields system
|
||||
/// The support range for the client project*
|
||||
pub client_side: LegacySideType,
|
||||
@@ -269,7 +269,7 @@ impl std::fmt::Display for LegacySideType {
|
||||
}
|
||||
|
||||
impl LegacySideType {
|
||||
// These are constant, so this can remove unneccessary allocations (`to_string`)
|
||||
// These are constant, so this can remove unnecessary allocations (`to_string`)
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
LegacySideType::Required => "required",
|
||||
@@ -292,7 +292,7 @@ impl LegacySideType {
|
||||
/// A specific version of a project
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub struct LegacyVersion {
|
||||
/// Relevant V2 fields- these were removed or modfified in V3,
|
||||
/// Relevant V2 fields- these were removed or modified in V3,
|
||||
/// and are now part of the dynamic fields system
|
||||
/// A list of game versions this project supports
|
||||
pub game_versions: Vec<String>,
|
||||
|
||||
@@ -22,7 +22,7 @@ pub struct Collection {
|
||||
/// Color of the collection.
|
||||
pub color: Option<u32>,
|
||||
|
||||
/// The status of the collectin (eg: whether collection is public or not)
|
||||
/// The status of the collection (eg: whether collection is public or not)
|
||||
pub status: CollectionStatus,
|
||||
|
||||
/// The date at which the collection was first published.
|
||||
|
||||
@@ -650,7 +650,7 @@ impl NotificationDeliveryStatus {
|
||||
NotificationDeliveryStatus::Delivered => Ok(()),
|
||||
NotificationDeliveryStatus::SkippedPreferences |
|
||||
NotificationDeliveryStatus::SkippedDefault |
|
||||
NotificationDeliveryStatus::Pending => Err(ApiError::InvalidInput("An error occured while sending an email to your email address. Please try again later.".to_owned())),
|
||||
NotificationDeliveryStatus::Pending => Err(ApiError::InvalidInput("An error occurred while sending an email to your email address. Please try again later.".to_owned())),
|
||||
NotificationDeliveryStatus::PermanentlyFailed => Err(ApiError::InvalidInput("This email address doesn't exist! Please try another one.".to_owned())),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct Project {
|
||||
pub id: ProjectId,
|
||||
/// The slug of a project, used for vanity URLs
|
||||
pub slug: Option<String>,
|
||||
/// The aggregated project typs of the versions of this project
|
||||
/// The aggregated project typos of the versions of this project
|
||||
pub project_types: Vec<String>,
|
||||
/// The aggregated games of the versions of this project
|
||||
pub games: Vec<String>,
|
||||
@@ -49,7 +49,7 @@ pub struct Project {
|
||||
|
||||
/// The status of the project
|
||||
pub status: ProjectStatus,
|
||||
/// The requested status of this projct
|
||||
/// The requested status of this project
|
||||
pub requested_status: Option<ProjectStatus>,
|
||||
|
||||
/// DEPRECATED: moved to threads system
|
||||
|
||||
@@ -65,7 +65,7 @@ impl std::fmt::Display for ThreadType {
|
||||
}
|
||||
|
||||
impl ThreadType {
|
||||
// These are constant, so this can remove unneccessary allocations (`to_string`)
|
||||
// These are constant, so this can remove unnecessary allocations (`to_string`)
|
||||
pub fn as_str(&self) -> &'static str {
|
||||
match self {
|
||||
ThreadType::Report => "report",
|
||||
|
||||
@@ -502,7 +502,7 @@ async fn update_anrok_transactions(
|
||||
|
||||
/// Attempts to process a user redeemal.
|
||||
///
|
||||
/// Returns `Ok` if the entry has been succesfully processed, or will not be processed.
|
||||
/// Returns `Ok` if the entry has been successfully processed, or will not be processed.
|
||||
pub async fn try_process_user_redeemal(
|
||||
pool: &PgPool,
|
||||
redis: &RedisPool,
|
||||
|
||||
@@ -75,7 +75,7 @@ pub enum AttachedCharge {
|
||||
/// This can be used in the case of resubscription flows. The amount from this
|
||||
/// charge will be used, but the tax will be recalculated and the charge updated.
|
||||
///
|
||||
/// The charge's status will NOT be updated - it is the caller's responsability to
|
||||
/// The charge's status will NOT be updated - it is the caller's responsibility to
|
||||
/// update the charge's status on failure or success.
|
||||
///
|
||||
/// This may be accompanied by an automated payment session.
|
||||
@@ -160,7 +160,7 @@ pub struct PaymentBootstrapOptions<'a> {
|
||||
///
|
||||
/// Taxes will always be collected.
|
||||
///
|
||||
/// Note the charge will NOT be updated. It is the caller's responsability to update the charge
|
||||
/// Note the charge will NOT be updated. It is the caller's responsibility to update the charge
|
||||
/// on success or failure.
|
||||
pub payment_session: PaymentSession,
|
||||
/// The charge the payment intent on should be based upon.
|
||||
@@ -185,7 +185,7 @@ pub struct PaymentBootstrapResults {
|
||||
///
|
||||
/// # Important notes
|
||||
///
|
||||
/// - This function does not perform any database writes. It is the caller's responsability to, for
|
||||
/// - This function does not perform any database writes. It is the caller's responsibility to, for
|
||||
/// example, update the charge's status on success or failure, or update the charge's tax amount,
|
||||
/// tax eligibility or payment and tax platform IDs.
|
||||
/// - You may not update or create a payment intent for an off-session payment flow without
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//! TODO: this module should be removed; it is superceded by `analytics_get`
|
||||
//! TODO: this module should be removed; it is superseded by `analytics_get`
|
||||
|
||||
use super::ApiError;
|
||||
use crate::database;
|
||||
@@ -412,7 +412,7 @@ pub async fn revenue_get(
|
||||
/// Get country data for a set of projects or versions
|
||||
/// Data is returned as a hashmap of project/version ids to a hashmap of coutnry to downloads.
|
||||
/// Unknown countries are labeled "".
|
||||
/// This is usuable to see significant performing countries per project
|
||||
/// This is usable to see significant performing countries per project
|
||||
/// eg:
|
||||
/// {
|
||||
/// "4N1tEhnO": {
|
||||
@@ -485,7 +485,7 @@ pub async fn countries_downloads_get(
|
||||
/// Get country data for a set of projects or versions
|
||||
/// Data is returned as a hashmap of project/version ids to a hashmap of coutnry to views.
|
||||
/// Unknown countries are labeled "".
|
||||
/// This is usuable to see significant performing countries per project
|
||||
/// This is usable to see significant performing countries per project
|
||||
/// eg:
|
||||
/// {
|
||||
/// "4N1tEhnO": {
|
||||
|
||||
@@ -355,7 +355,7 @@ pub async fn index_local(
|
||||
}
|
||||
|
||||
// SPECIAL BEHAVIOUR:
|
||||
// For consitency with v2 searching, we manually input the
|
||||
// For consistency with v2 searching, we manually input the
|
||||
// client_side and server_side fields from the loader fields into
|
||||
// separate loader fields.
|
||||
// 'client_side' and 'server_side' remain supported by meilisearch even though they are no longer v3 fields.
|
||||
|
||||
@@ -33,7 +33,7 @@ pub struct FormResponse {
|
||||
pub company_name: String,
|
||||
pub company_email: String,
|
||||
pub reference_id: String,
|
||||
/// This is a DateTime, but it's not consistent wether it has a
|
||||
/// This is a DateTime, but it's not consistent whether it has a
|
||||
/// timezone or not, so we just parse it as a string and use [`Utc::now()`](fn@chrono::Utc::now)
|
||||
/// rather than using the provided DateTime.
|
||||
pub signed_at: Option<String>,
|
||||
|
||||
@@ -198,7 +198,7 @@ pub async fn delete_old_images(
|
||||
|
||||
// check changes to associated images
|
||||
// if they no longer exist in the String list, delete them
|
||||
// Eg: if description is modified and no longer contains a link to an iamge
|
||||
// Eg: if description is modified and no longer contains a link to an image
|
||||
pub async fn delete_unused_images(
|
||||
context: ImageContext,
|
||||
reference_strings: Vec<&str>,
|
||||
|
||||
Reference in New Issue
Block a user