Skip to content

Commit 0ad819f

Browse files
committed
(chore): Updated the repository toolchain
1 parent 5edde88 commit 0ad819f

13 files changed

Lines changed: 39 additions & 39 deletions

lambda-appsync-proc/src/internal/make_appsync/legacy/appsync_lambda_main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ enum AppsyncLambdaMainParameter {
7474
LogInit(Ident),
7575
#[cfg(feature = "log")]
7676
EventLogging(bool),
77-
TypeOverride(TypeOverride),
77+
TypeOverride(Box<TypeOverride>),
7878
NameOverride(NameOverride),
7979
}
8080
impl OptionalParameter for AppsyncLambdaMainParameter {
@@ -184,11 +184,11 @@ impl OptionalParameters<AppsyncLambdaMainParameter> for AppsyncLambdaMainParamet
184184
if let Some(arg_name) = to.arg_name() {
185185
// There is a `.param`
186186
// This is a parameter override
187-
to_field_entry.1.insert(arg_name.to_string(), to);
187+
to_field_entry.1.insert(arg_name.to_string(), *to);
188188
} else {
189189
// no `.param`
190190
// This is just a field override
191-
to_field_entry.0.replace(to);
191+
to_field_entry.0.replace(*to);
192192
}
193193
}
194194
AppsyncLambdaMainParameter::NameOverride(no) => {

lambda-appsync-proc/src/internal/make_appsync/make_handlers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub(super) enum MakeHandlersParameter {
1212
/// Whether to generate a batch handler (default: `true`).
1313
Batch(bool),
1414
/// A custom operation type to use instead of the default `Operation`.
15-
OperationType(Type),
15+
OperationType(Box<Type>),
1616
}
1717
impl OptionalParameter for MakeHandlersParameter {
1818
fn try_parse_parameter(
@@ -45,7 +45,7 @@ impl OptionalParameters<MakeHandlersParameter> for MakeHandlersParameters {
4545
fn set_param(&mut self, p: MakeHandlersParameter) {
4646
match p {
4747
MakeHandlersParameter::Batch(batch) => self.batch = batch,
48-
MakeHandlersParameter::OperationType(t) => self.operation_type = Some(t),
48+
MakeHandlersParameter::OperationType(t) => self.operation_type = Some(*t),
4949
}
5050
}
5151
}

lambda-appsync-proc/src/internal/make_appsync/overrides.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ pub(crate) type ArgName = String;
126126
use super::optional_parameter::{OptionalParameter, OptionalParameters, ParameterError, Unknown};
127127
/// A single parsed override parameter, either a type override or a name override.
128128
pub(super) enum OverrideParameter {
129-
TypeOverride(TypeOverride),
129+
TypeOverride(Box<TypeOverride>),
130130
NameOverride(NameOverride),
131131
}
132132

@@ -162,11 +162,11 @@ impl OptionalParameters<OverrideParameter> for OverrideParameters {
162162
if let Some(arg_name) = to.arg_name() {
163163
// There is a `.param`
164164
// This is a parameter override
165-
to_field_entry.1.insert(arg_name.to_string(), to);
165+
to_field_entry.1.insert(arg_name.to_string(), *to);
166166
} else {
167167
// no `.param`
168168
// This is just a field override
169-
to_field_entry.0.replace(to);
169+
to_field_entry.0.replace(*to);
170170
}
171171
}
172172
OverrideParameter::NameOverride(no) => {

lambda-appsync-proc/tests/fail/invalid_log_init_ret.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0271]: expected `custom_log_init` to be a fn item that returns `()`, but it returns `&str`
1+
error[E0271]: expected `custom_log_init` to return `()`, but it returns `&str`
22
--> tests/fail/invalid_log_init_ret.rs:7:67
33
|
44
7 | appsync_lambda_main!("../../../../schema.graphql", log_init = custom_log_init);

lambda-appsync-proc/tests/fail/invalid_operation.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ help: consider importing one of these modules
1414
|
1515
1 + use crate::__operations::queries::game_status::without_event;
1616
|
17-
and 5 other candidates
17+
= and 5 other candidates

lambda-appsync-proc/tests/fail/invalid_return_type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0271]: expected `wrong_return_type` to be a fn item that returns `Result<Vec<Player>, AppsyncError>`, but it returns `Result<String, AppsyncError>`
1+
error[E0271]: expected `wrong_return_type` to return `Result<Vec<Player>, AppsyncError>`, but it returns `Result<String, AppsyncError>`
22
--> tests/fail/invalid_return_type.rs:7:10
33
|
44
6 | #[appsync_operation(query(players))]

lambda-appsync-proc/tests/fail/invalid_type_field_override.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `NonExistentType` in this scope
1+
error[E0425]: cannot find type `NonExistentType` in this scope
22
--> tests/fail/invalid_type_field_override.rs:7:32
33
|
44
7 | type_override = Player.id: NonExistentType,

lambda-appsync-proc/tests/fail/invalid_type_operation_arg_override.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0412]: cannot find type `BadId` in this scope
1+
error[E0425]: cannot find type `BadId` in this scope
22
--> tests/fail/invalid_type_operation_arg_override.rs:7:38
33
|
44
7 | type_override = Query.player.id: BadId,
Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
error[E0412]: cannot find type `InvalidStatus` in this scope
1+
error[E0425]: cannot find type `InvalidStatus` in this scope
22
--> tests/fail/invalid_type_operation_override.rs:7:39
33
|
44
7 | type_override = Query.gameStatus: InvalidStatus,
55
| ^^^^^^^^^^^^^ not found in this scope
6+
7+
error[E0282]: type annotations needed
8+
--> tests/fail/invalid_type_operation_override.rs:3:1
9+
|
10+
3 | / appsync_lambda_main!(
11+
4 | | "../../../../schema.graphql",
12+
5 | | exclude_lambda_handler = true,
13+
... |
14+
8 | | );
15+
| |_^ cannot infer type
16+
|
17+
= note: this error originates in the macro `appsync_lambda_main` (in Nightly builds, run with -Z macro-backtrace for more info)

lambda-appsync-proc/tests/fail/missing_arg.stderr

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ error[E0308]: mismatched types
22
--> tests/fail/missing_arg.rs:6:1
33
|
44
6 | #[appsync_operation(mutation(createPlayer))]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
| |
7-
| expected `(String,)`, found `()`
8-
| this expression has type `(std::string::String,)`
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `(String,)`, found `()`
96
|
107
= note: expected tuple `(std::string::String,)`
118
found unit type `()`

0 commit comments

Comments
 (0)