mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-09 11:21:51 +01:00
fix: stable enum entries
This commit is contained in:
parent
6ef4bdf587
commit
71f98d0293
@ -1,6 +1,7 @@
|
|||||||
use dagger_core::introspection::FullType;
|
use dagger_core::introspection::FullType;
|
||||||
use genco::prelude::rust;
|
use genco::prelude::rust;
|
||||||
use genco::quote;
|
use genco::quote;
|
||||||
|
use itertools::Itertools;
|
||||||
|
|
||||||
fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
||||||
let values = values
|
let values = values
|
||||||
@ -10,6 +11,7 @@ fn render_enum_values(values: &FullType) -> Option<rust::Tokens> {
|
|||||||
.map(|values| {
|
.map(|values| {
|
||||||
values
|
values
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
.sorted_by_key(|a| &a.name)
|
||||||
.map(|val| quote! { $(val.name.as_ref()), })
|
.map(|val| quote! { $(val.name.as_ref()), })
|
||||||
})
|
})
|
||||||
.flatten()
|
.flatten()
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user