Skip to content

Commit

Permalink
Merge pull request #210 from Enraged-Dun-Cookie-Development-Team/fix-…
Browse files Browse the repository at this point in the history
…修复region枚举序列化错误

🐛 修复region枚举序列化和反序列化错误
  • Loading branch information
phidiaLam authored Sep 22, 2024
2 parents 80eae29 + 9ebfaf6 commit 1db1593
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ where
C: GetDatabaseTransaction,
{
type Error = C::Error;
type Transaction<'s> = C::Transaction<'s>
type Transaction<'s>
= C::Transaction<'s>
where
Self: 's;
type TransactionFuture<'s> = C::TransactionFuture<'s>
type TransactionFuture<'s>
= C::TransactionFuture<'s>
where
Self: 's;

Expand All @@ -48,7 +50,8 @@ impl<C, Collect> GetDatabaseCollection<Collect> for DatabaseOperate<C>
where
C: GetDatabaseCollection<Collect>,
{
type CollectGuard<'s> =C::CollectGuard<'s>
type CollectGuard<'s>
= C::CollectGuard<'s>
where
Self: 's;
type Error = C::Error;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct LocalizedTags {
}

#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)]
#[serde(rename_all_fields = "SCREAMING_SNAKE_CASE")]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum Region {
ChinaMainland,
ExceptChinaMainland,
Expand Down
8 changes: 5 additions & 3 deletions src/bootstrap/decorator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ pub struct TimeoutDecorator(
);

impl PrepareDecorator for TimeoutDecorator {
type OutFut< Fut, T> = LocalBoxFuture<'static,Result<T,PrepareError>>

where Fut: Future<Output=Result<T, PrepareError>> +'static,T: 'static;
type OutFut<Fut, T>
= LocalBoxFuture<'static, Result<T, PrepareError>>
where
Fut: Future<Output = Result<T, PrepareError>> + 'static,
T: 'static;

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

0 comments on commit 1db1593

Please sign in to comment.