File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3846,12 +3846,10 @@ impl<'a> Collation<'a> {
3846
3846
pub fn max_len ( & self ) -> u8 {
3847
3847
self . max_len
3848
3848
}
3849
- }
3850
3849
3851
- impl From < CollationId > for Collation < ' static > {
3852
- /// Convert a collation ID to a collation.
3853
- fn from ( value : CollationId ) -> Self {
3854
- match value {
3850
+ /// Resolve collation id into a collation.
3851
+ pub const fn resolve ( id : CollationId ) -> Collation < ' static > {
3852
+ match id {
3855
3853
CollationId :: UNKNOWN_COLLATION_ID => Self :: UNKNOWN_COLLATION ,
3856
3854
CollationId :: BIG5_CHINESE_CI => Self :: BIG5_CHINESE_CI_COLLATION ,
3857
3855
CollationId :: LATIN2_CZECH_CS => Self :: LATIN2_CZECH_CS_COLLATION ,
@@ -4142,3 +4140,10 @@ impl From<CollationId> for Collation<'static> {
4142
4140
}
4143
4141
}
4144
4142
}
4143
+
4144
+ impl From < CollationId > for Collation < ' static > {
4145
+ /// Convert a collation ID to a collation.
4146
+ fn from ( value : CollationId ) -> Self {
4147
+ Collation :: resolve ( value)
4148
+ }
4149
+ }
You can’t perform that action at this time.
0 commit comments