Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update libraries, bump MSRV, panic if update_cr_core is used more than once #81

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["RakuJa"]

# Compiler info
edition = "2021"
rust-version = "1.75.0"
rust-version = "1.79.0"

description = "Beyond Your Bestiary Explorer (BYBE) is a web service that provides tools to help Pathfinder 2e Game Masters."
readme = "README.md"
Expand Down Expand Up @@ -39,8 +39,8 @@ sqlx = { version = "0.8.2", features = ["runtime-async-std", "sqlite"] }
cached = { version = "0.54.0", features = ["async"] }

anyhow = "1.0.93"
serde = { version = "1.0.214", features = ["derive"] }
serde_json = "1.0.132"
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
strum = {version="0.26.3", features = ["derive"]}
fastrand = "2.2.0"
counter = "0.6.0"
Expand All @@ -56,6 +56,7 @@ dotenvy = "0.15.7"
env_logger = "0.11.5"
log = "0.4.22"
once_cell = "1.20.2"
once = "0.3.4"

[build-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread", "rt"] }
Expand Down
6 changes: 4 additions & 2 deletions src/db/cr_core_initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ use crate::models::creature::creature_metadata::type_enum::CreatureTypeEnum;
use crate::models::shared::rarity_enum::RarityEnum;
use crate::models::shared::size_enum::SizeEnum;
use anyhow::{bail, Result};
use once::assert_has_not_been_called;
use serde::{Deserialize, Serialize};
use sqlx::{FromRow, Pool, Sqlite};

/// Handler for startup, first creature_core initialization. Then it shouldn't be used

pub async fn update_creature_core_table(conn: &Pool<Sqlite>) -> Result<()> {
assert_has_not_been_called!(
"Handler for startup, first creature_core initialization. Then it shouldn't be used"
);
let scales = fetch_creature_scales(conn).await?;
for cr in get_creatures_raw_essential_data(conn, 0, -1).await? {
let traits = fetch_creature_traits(conn, cr.id).await?;
Expand Down
Loading