diff --git a/Cargo.toml b/Cargo.toml index b6ebc01..0b72c95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mostro-core" -version = "0.6.18" +version = "0.6.19" edition = "2021" license = "MIT" authors = ["Francisco Calderón "] diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..1173a45 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +channel = "1.82.0" +profile = "minimal" +components = ["clippy", "rust-docs", "rustfmt"] +targets = ["wasm32-unknown-unknown"] \ No newline at end of file diff --git a/src/user.rs b/src/user.rs index 3830ac6..1e50f13 100644 --- a/src/user.rs +++ b/src/user.rs @@ -5,7 +5,7 @@ use sqlx::FromRow; /// Database representation of an user #[cfg_attr(feature = "sqlx", derive(FromRow))] -#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq, Eq)] +#[derive(Debug, Default, Deserialize, Serialize, Clone, PartialEq)] pub struct User { pub pubkey: String, pub is_admin: i64, @@ -16,7 +16,7 @@ pub struct User { /// the trade_index is greater than the one we have in database pub last_trade_index: i64, pub total_reviews: i64, - pub total_rating: i64, + pub total_rating: f64, pub last_rating: i64, pub max_rating: i64, pub min_rating: i64, @@ -40,7 +40,7 @@ impl User { category, last_trade_index: trade_index, total_reviews: 0, - total_rating: 0, + total_rating: 0.0, last_rating: 0, max_rating: 0, min_rating: 0,