@@ -96,11 +96,11 @@ fn get_set_schema_from_file(schema_path: &std::path::Path) -> Schema {
96
96
97
97
/// Generates Rust code given a path to a query file, a path to a schema file, and options.
98
98
pub fn generate_module_token_stream (
99
- query_path : std:: path:: PathBuf ,
99
+ query_path : & std:: path:: Path ,
100
100
schema_path : & std:: path:: Path ,
101
- options : GraphQLClientCodegenOptions ,
101
+ options : & GraphQLClientCodegenOptions ,
102
102
) -> Result < TokenStream , BoxError > {
103
- let query = get_set_query_from_file ( query_path. as_path ( ) ) ;
103
+ let query = get_set_query_from_file ( query_path) ;
104
104
let schema = get_set_schema_from_file ( schema_path) ;
105
105
106
106
generate_module_token_stream_inner ( & query, & schema, options)
@@ -110,7 +110,7 @@ pub fn generate_module_token_stream(
110
110
pub fn generate_module_token_stream_from_string (
111
111
query_string : & str ,
112
112
schema_path : & std:: path:: Path ,
113
- options : GraphQLClientCodegenOptions ,
113
+ options : & GraphQLClientCodegenOptions ,
114
114
) -> Result < TokenStream , BoxError > {
115
115
let query = ( query_string. to_string ( ) , query_document ( query_string) ?) ;
116
116
let schema = get_set_schema_from_file ( schema_path) ;
@@ -122,7 +122,7 @@ pub fn generate_module_token_stream_from_string(
122
122
fn generate_module_token_stream_inner (
123
123
query : & ( String , QueryDocument ) ,
124
124
schema : & Schema ,
125
- options : GraphQLClientCodegenOptions ,
125
+ options : & GraphQLClientCodegenOptions ,
126
126
) -> Result < TokenStream , BoxError > {
127
127
let ( query_string, query_document) = query;
128
128
@@ -157,7 +157,7 @@ fn generate_module_token_stream_inner(
157
157
schema,
158
158
resolved_query : & query,
159
159
operation : & operation. 1 . name ,
160
- options : & options ,
160
+ options,
161
161
}
162
162
. to_token_stream ( ) ?;
163
163
modules. push ( generated) ;
0 commit comments