From af1ffdad83db8b5d005e0aba2fc49a6e65c0c9bf Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Tue, 7 Dec 2021 17:21:03 +0800 Subject: [PATCH] Rename `sea-strum` lib back to `strum` --- Cargo.toml | 2 +- src/entity/base_entity.rs | 2 +- src/executor/query.rs | 2 +- src/executor/select.rs | 10 +++++----- src/lib.rs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 47f075eb8..5a03f68f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ log = { version = "^0.4", optional = true } rust_decimal = { version = "^1", optional = true } sea-orm-macros = { version = "^0.4.1", path = "sea-orm-macros", optional = true } sea-query = { version = "^0.19.1", features = ["thread-safe"] } -sea-strum = { version = "^0.21", features = ["derive", "sea-orm"] } +sea-strum = { version = "^0.21", git = "https://github.com/SeaQL/strum.git", branch = "pulls/1", features = ["derive", "sea-orm"] } serde = { version = "^1.0", features = ["derive"] } serde_json = { version = "^1", optional = true } sqlx = { version = "^0.5", optional = true } diff --git a/src/entity/base_entity.rs b/src/entity/base_entity.rs index e6247d352..a8d50fd76 100644 --- a/src/entity/base_entity.rs +++ b/src/entity/base_entity.rs @@ -4,7 +4,7 @@ use crate::{ RelationTrait, RelationType, Select, Update, UpdateMany, UpdateOne, }; use sea_query::{Alias, Iden, IntoIden, IntoTableRef, IntoValueTuple, TableRef}; -pub use sea_strum::IntoEnumIterator as Iterable; +pub use strum::IntoEnumIterator as Iterable; use std::fmt::Debug; /// Ensure the identifier for an Entity can be converted to a static str diff --git a/src/executor/query.rs b/src/executor/query.rs index f50703845..c7928ef9a 100644 --- a/src/executor/query.rs +++ b/src/executor/query.rs @@ -378,7 +378,7 @@ pub trait TryGetableMany: Sized { /// ``` fn find_by_statement(stmt: Statement) -> SelectorRaw> where - C: sea_strum::IntoEnumIterator + sea_query::Iden, + C: strum::IntoEnumIterator + sea_query::Iden, { SelectorRaw::>::with_columns(stmt) } diff --git a/src/executor/select.rs b/src/executor/select.rs index 4c0d8ecfc..9f51d9585 100644 --- a/src/executor/select.rs +++ b/src/executor/select.rs @@ -45,7 +45,7 @@ pub trait SelectorTrait { pub struct SelectGetableValue where T: TryGetableMany, - C: sea_strum::IntoEnumIterator + sea_query::Iden, + C: strum::IntoEnumIterator + sea_query::Iden, { columns: PhantomData, model: PhantomData, @@ -73,7 +73,7 @@ where impl SelectorTrait for SelectGetableValue where T: TryGetableMany, - C: sea_strum::IntoEnumIterator + sea_query::Iden, + C: strum::IntoEnumIterator + sea_query::Iden, { type Item = T; @@ -247,7 +247,7 @@ where pub fn into_values(self) -> Selector> where T: TryGetableMany, - C: sea_strum::IntoEnumIterator + sea_query::Iden, + C: strum::IntoEnumIterator + sea_query::Iden, { Selector::>::with_columns(self.query) } @@ -407,7 +407,7 @@ where pub fn with_columns(query: SelectStatement) -> Selector> where T: TryGetableMany, - C: sea_strum::IntoEnumIterator + sea_query::Iden, + C: strum::IntoEnumIterator + sea_query::Iden, { Selector { query, @@ -480,7 +480,7 @@ where pub fn with_columns(stmt: Statement) -> SelectorRaw> where T: TryGetableMany, - C: sea_strum::IntoEnumIterator + sea_query::Iden, + C: strum::IntoEnumIterator + sea_query::Iden, { SelectorRaw { stmt, diff --git a/src/lib.rs b/src/lib.rs index 469619f03..23bf34d86 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -305,5 +305,5 @@ pub use sea_query::Iden; #[cfg(feature = "macros")] pub use sea_query::Iden as DeriveIden; -pub use sea_strum; -pub use sea_strum::EnumIter; +pub use strum; +pub use strum::EnumIter;