Skip to content

Commit 2656ceb

Browse files
authored
chore: bump to 1.85, edition 2024 (#1172)
1 parent 7b04298 commit 2656ceb

File tree

142 files changed

+385
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+385
-373
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
28-
- uses: dtolnay/rust-toolchain@1.80.0
28+
- uses: dtolnay/rust-toolchain@1.85.0
2929
with:
3030
components: rustfmt
3131
- name: Check format
@@ -40,7 +40,7 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242

43-
- uses: dtolnay/rust-toolchain@1.80.0
43+
- uses: dtolnay/rust-toolchain@1.85.0
4444
with:
4545
components: rustfmt
4646

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77

88
.envrc
9+
.jj

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ default-members = [
3232

3333
[workspace.package]
3434
authors = ["Graeme Coupar <graeme@turbofish.tech>"]
35-
edition = "2021"
35+
edition = "2024"
3636
homepage = "https://cynic-rs.dev"
3737
repository = "https://github.com/obmarg/cynic"
3838
license = "MPL-2.0"
3939
version = "3.12.0"
40-
rust-version = "1.80"
40+
rust-version = "1.85"
4141

4242
[workspace.dependencies]
4343
darling = "0.20"

cynic-cli/src/introspect.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pub(crate) enum IntrospectError {
5252
GraphQlError,
5353
#[error(transparent)]
5454
HttpError(#[from] cynic::http::CynicReqwestError),
55-
#[error("Couldn't parse a header from {0}. Make sure you've passed a header of the form `Name: Value`")]
55+
#[error(
56+
"Couldn't parse a header from {0}. Make sure you've passed a header of the form `Name: Value`"
57+
)]
5658
MalformedHeaderArgument(String),
5759
#[error("Couldn't convert introspection result into schema: {0}")]
5860
SchemaError(cynic_introspection::SchemaError),

cynic-codegen/src/enum_derive/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ use crate::{
77
error::Errors,
88
idents::RenameAll,
99
schema::{
10-
types::{EnumType, EnumValue},
1110
Schema, Unvalidated,
11+
types::{EnumType, EnumValue},
1212
},
1313
};
1414

cynic-codegen/src/fragment_derive/arguments/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111

1212
pub use self::{
1313
output::Output,
14-
parsing::{arguments_from_field_attrs, CynicArguments, FieldArgument, FieldArgumentValue},
14+
parsing::{CynicArguments, FieldArgument, FieldArgumentValue, arguments_from_field_attrs},
1515
};
1616

1717
pub(super) use self::parsing::ArgumentLiteral;

cynic-codegen/src/fragment_derive/arguments/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use quote::{format_ident, quote, ToTokens, TokenStreamExt};
1+
use quote::{ToTokens, TokenStreamExt, format_ident, quote};
22

33
use crate::idents::to_pascal_case;
44

cynic-codegen/src/fragment_derive/arguments/parsing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use proc_macro2::Span;
22
use syn::{
3+
Ident, Result, Token,
34
ext::IdentExt,
45
parse::{Parse, ParseStream},
56
punctuated::Punctuated,
67
spanned::Spanned,
7-
Ident, Result, Token,
88
};
99

1010
pub fn arguments_from_field_attrs(

cynic-codegen/src/fragment_derive/arguments/tests.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use proc_macro2::Span;
22
use rstest::rstest;
33
use syn::parse_quote;
44

5-
use crate::schema::{types::Type, Schema, SchemaInput};
5+
use crate::schema::{Schema, SchemaInput, types::Type};
66

77
use super::{analyse::analyse_field_arguments, parsing::CynicArguments};
88

@@ -55,14 +55,10 @@ fn test_analyse_errors_without_argument_struct() {
5555
parse_quote! { filters: $aVaraible, optionalFilters: $anotherVar };
5656
let literals = literals.arguments.into_iter().collect::<Vec<_>>();
5757

58-
insta::assert_debug_snapshot!(analyse_field_arguments(
59-
&schema,
60-
literals,
61-
field,
62-
None,
63-
Span::call_site()
58+
insta::assert_debug_snapshot!(
59+
analyse_field_arguments(&schema, literals, field, None, Span::call_site())
60+
.map(|o| o.arguments)
6461
)
65-
.map(|o| o.arguments))
6662
}
6763

6864
const SCHEMA: &str = r#"

cynic-codegen/src/fragment_derive/deserialize_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl quote::ToTokens for DeserializeImpl<'_> {
7676

7777
impl quote::ToTokens for StandardDeserializeImpl<'_> {
7878
fn to_tokens(&self, tokens: &mut TokenStream) {
79-
use quote::{quote, TokenStreamExt};
79+
use quote::{TokenStreamExt, quote};
8080

8181
let target_struct = &self.target_struct;
8282
let serialized_names = self
@@ -215,7 +215,7 @@ impl quote::ToTokens for StandardDeserializeImpl<'_> {
215215

216216
impl quote::ToTokens for SpreadingDeserializeImpl<'_> {
217217
fn to_tokens(&self, tokens: &mut TokenStream) {
218-
use quote::{quote, TokenStreamExt};
218+
use quote::{TokenStreamExt, quote};
219219

220220
let target_struct = &self.target_struct;
221221

0 commit comments

Comments
 (0)