File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
graphql_client_codegen/src Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ pub enum DeprecationStrategy {
17
17
Warn ,
18
18
}
19
19
20
+ impl Default for DeprecationStrategy {
21
+ fn default ( ) -> Self { DeprecationStrategy :: Warn }
22
+ }
23
+
20
24
pub fn extract_deprecation_strategy (
21
25
ast : & syn:: DeriveInput ,
22
26
) -> Result < DeprecationStrategy , failure:: Error > {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ fn build_graphql_client_derive_options(input: &syn::DeriveInput) -> GraphQLClien
34
34
let response_derives = attributes:: extract_attr ( input, "response_derives" ) . ok ( ) ;
35
35
// The user can determine what to do about deprecations.
36
36
let deprecation_strategy = deprecation:: extract_deprecation_strategy ( input)
37
- . unwrap_or ( deprecation:: DeprecationStrategy :: Warn ) ;
37
+ . unwrap_or ( deprecation:: DeprecationStrategy :: default ( ) ) ;
38
38
39
39
GraphQLClientDeriveOptions {
40
40
selected_operation : input. ident . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments