Skip to content

Commit 6238025

Browse files
committed
rename DefaultValue enum variant
1 parent 046ebc7 commit 6238025

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/graphql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ fn function_args(schema: &Arc<__Schema>, func: &Arc<Function>) -> Vec<__InputVal
13761376
.map(|(arg_type, arg_name, arg_default)| {
13771377
let default_value = if let Some(default_value) = arg_default {
13781378
match default_value {
1379-
DefaultValue::Value(value) => Some(value),
1379+
DefaultValue::NonNull(value) => Some(value),
13801380
DefaultValue::Null => None,
13811381
}
13821382
} else {

src/sql_types.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ struct ArgsIterator<'a> {
205205

206206
#[derive(Clone)]
207207
pub(crate) enum DefaultValue {
208-
Value(String),
208+
NonNull(String),
209209
Null,
210210
}
211211

@@ -270,17 +270,17 @@ impl<'a> ArgsIterator<'a> {
270270
21 | 23 => trimmed
271271
.parse::<i32>()
272272
.ok()
273-
.map(|i| DefaultValue::Value(i.to_string())),
273+
.map(|i| DefaultValue::NonNull(i.to_string())),
274274
16 => trimmed
275275
.parse::<bool>()
276276
.ok()
277-
.map(|i| DefaultValue::Value(i.to_string())),
277+
.map(|i| DefaultValue::NonNull(i.to_string())),
278278
700 | 701 => trimmed
279279
.parse::<f64>()
280280
.ok()
281-
.map(|i| DefaultValue::Value(i.to_string())),
281+
.map(|i| DefaultValue::NonNull(i.to_string())),
282282
25 => trimmed.strip_suffix("::text").map(|i| {
283-
DefaultValue::Value(format!("\"{}\"", i.trim_matches(',').trim_matches('\'')))
283+
DefaultValue::NonNull(format!("\"{}\"", i.trim_matches(',').trim_matches('\'')))
284284
}),
285285
_ => None,
286286
}

0 commit comments

Comments
 (0)