Skip to content

Commit 1db1593

Browse files
authored
Merge pull request #210 from Enraged-Dun-Cookie-Development-Team/fix-修复region枚举序列化错误
🐛 修复region枚举序列化和反序列化错误
2 parents 80eae29 + 9ebfaf6 commit 1db1593

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

persistence/database/database_traits/src/database_operates/db_op_impls.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ where
3232
C: GetDatabaseTransaction,
3333
{
3434
type Error = C::Error;
35-
type Transaction<'s> = C::Transaction<'s>
35+
type Transaction<'s>
36+
= C::Transaction<'s>
3637
where
3738
Self: 's;
38-
type TransactionFuture<'s> = C::TransactionFuture<'s>
39+
type TransactionFuture<'s>
40+
= C::TransactionFuture<'s>
3941
where
4042
Self: 's;
4143

@@ -48,7 +50,8 @@ impl<C, Collect> GetDatabaseCollection<Collect> for DatabaseOperate<C>
4850
where
4951
C: GetDatabaseCollection<Collect>,
5052
{
51-
type CollectGuard<'s> =C::CollectGuard<'s>
53+
type CollectGuard<'s>
54+
= C::CollectGuard<'s>
5255
where
5356
Self: 's;
5457
type Error = C::Error;

persistence/models/mongo-models/src/ceobe/operation/tool_link/models/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub struct LocalizedTags {
2020
}
2121

2222
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
23-
#[serde(rename_all_fields = "SCREAMING_SNAKE_CASE")]
23+
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
2424
pub enum Region {
2525
ChinaMainland,
2626
ExceptChinaMainland,

src/bootstrap/decorator.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ pub struct TimeoutDecorator(
1515
);
1616

1717
impl PrepareDecorator for TimeoutDecorator {
18-
type OutFut< Fut, T> = LocalBoxFuture<'static,Result<T,PrepareError>>
19-
20-
where Fut: Future<Output=Result<T, PrepareError>> +'static,T: 'static;
18+
type OutFut<Fut, T>
19+
= LocalBoxFuture<'static, Result<T, PrepareError>>
20+
where
21+
Fut: Future<Output = Result<T, PrepareError>> + 'static,
22+
T: 'static;
2123

2224
fn decorator<Fut, T>(
2325
&self, src: &'static str, in_fut: Fut,

0 commit comments

Comments
 (0)