call EnumIter::get
using fully qualified syntax (#2321)
* call `EnumIter::get` using fully qualified syntax `itertools` version 0.13.0 added a `get` method that takes precedence over the `EnumIter::get` method. The `EnumIter` derive should be calling the method fully-qualified to ensure that the local version is called rather than the method that is provided by the `Itertools` trait. This was fixed in `strum` 0.26.x, but since this is a forked/adapted version of the `EnumIter` derive, it requires the same fix . * CHANGELOG --------- Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
This commit is contained in:
parent
e13b23c884
commit
fb442298dd
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
+ `1.1.0-rc.1`: 2024-08-09
|
||||
|
||||
### Enhancements
|
||||
|
||||
* [sea-orm-macros] Call `EnumIter::get` using fully qualified syntax https://github.com/SeaQL/sea-orm/pull/2321
|
||||
|
||||
### Upgrades
|
||||
|
||||
* Upgrade `sqlx` to `0.8.2` https://github.com/SeaQL/sea-orm/pull/2305, https://github.com/SeaQL/sea-orm/pull/2371
|
||||
|
@ -131,7 +131,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
|
||||
::core::option::Option::None
|
||||
} else {
|
||||
self.idx = idx;
|
||||
self.get(idx - 1)
|
||||
#iter_name::get(self, idx - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -154,7 +154,7 @@ pub fn enum_iter_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
|
||||
::core::option::Option::None
|
||||
} else {
|
||||
self.back_idx = back_idx;
|
||||
self.get(#variant_count - self.back_idx)
|
||||
#iter_name::get(self, #variant_count - self.back_idx)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user