Skip to content

Commit 1b1fc61

Browse files
committed
Switch to 2024 Rust edition
- bump up MSRV to 1.85 - tune lints for 1.85 Rust
1 parent 66b19fa commit 1b1fc61

File tree

215 files changed

+799
-788
lines changed

Some content is hidden

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

215 files changed

+799
-788
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,25 +145,21 @@ jobs:
145145
strategy:
146146
fail-fast: false
147147
matrix:
148-
msrv: ["1.75.0"]
148+
msrv: ["1.85.0"]
149149
crate:
150150
- juniper_codegen
151151
- juniper
152152
- juniper_subscriptions
153153
- juniper_graphql_ws
154154
- juniper_actix
155155
- juniper_axum
156-
#- juniper_hyper
156+
- juniper_hyper
157157
- juniper_rocket
158158
- juniper_warp
159159
os:
160160
- ubuntu
161161
- macOS
162162
- windows
163-
include:
164-
- { msrv: "1.79.0", crate: "juniper_hyper", os: "ubuntu" }
165-
- { msrv: "1.79.0", crate: "juniper_hyper", os: "macOS" }
166-
- { msrv: "1.79.0", crate: "juniper_hyper", os: "windows" }
167163
runs-on: ${{ matrix.os }}-latest
168164
steps:
169165
- uses: actions/checkout@v4

benches/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "juniper_benchmarks"
33
version = "0.0.0"
4-
edition = "2021"
4+
edition = "2024"
55
authors = ["Christoph Herzog <[email protected]>"]
66
publish = false
77

benches/benches/benchmark.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
1+
use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
22

33
use juniper::InputValue;
44
use juniper_benchmarks as j;

benches/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use juniper::{
2-
graphql_object, DefaultScalarValue, EmptyMutation, EmptySubscription, ExecutionError,
3-
FieldError, GraphQLEnum, GraphQLObject, RootNode, Value, Variables,
2+
DefaultScalarValue, EmptyMutation, EmptySubscription, ExecutionError, FieldError, GraphQLEnum,
3+
GraphQLObject, RootNode, Value, Variables, graphql_object,
44
};
55

66
pub type QueryResult = Result<

book/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ create-missing = false
1616
git_repository_url = "https://github.com/graphql-rust/juniper"
1717

1818
[rust]
19-
edition = "2021"
19+
edition = "2024"

book/src/advanced/dataloader.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Let's remake our [example of N+1 problem](n_plus_1.md), so it's solved by applyi
1515
# use std::{collections::HashMap, sync::Arc};
1616
# use anyhow::anyhow;
1717
# use dataloader::non_cached::Loader;
18-
# use juniper::{graphql_object, GraphQLObject};
18+
# use juniper::{GraphQLObject, graphql_object};
1919
#
2020
# type CultId = i32;
2121
# type UserId = i32;

book/src/advanced/implicit_and_explicit_null.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The last two cases rely on being able to distinguish between [explicit and impli
5555
Unfortunately, plain `Option` is not capable to distinguish them. That's why in [Juniper], this can be done using the [`Nullable`] type:
5656
```rust
5757
# extern crate juniper;
58-
use juniper::{graphql_object, FieldResult, GraphQLInputObject, Nullable};
58+
use juniper::{FieldResult, GraphQLInputObject, Nullable, graphql_object};
5959

6060
#[derive(GraphQLInputObject)]
6161
struct UserPatchInput {

book/src/advanced/lookahead.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ In [GraphQL], look-ahead machinery allows us to introspect the currently [execut
88
In [Juniper], it's represented by the [`Executor::look_ahead()`][20] method.
99
```rust
1010
# extern crate juniper;
11-
# use juniper::{graphql_object, Executor, GraphQLObject, ScalarValue};
11+
# use juniper::{Executor, GraphQLObject, ScalarValue, graphql_object};
1212
#
1313
# type UserId = i32;
1414
#

book/src/advanced/n_plus_1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A common issue with [GraphQL] server implementations is how the [resolvers][2] q
77
# extern crate anyhow;
88
# extern crate juniper;
99
# use anyhow::anyhow;
10-
# use juniper::{graphql_object, GraphQLObject};
10+
# use juniper::{GraphQLObject, graphql_object};
1111
#
1212
# type CultId = i32;
1313
# type UserId = i32;

book/src/quickstart.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ For more advanced mappings, [Juniper] provides multiple macros to map your [Rust
3333
# use std::fmt::Display;
3434
#
3535
use juniper::{
36-
graphql_object, EmptySubscription, FieldResult, GraphQLEnum,
37-
GraphQLInputObject, GraphQLObject, ScalarValue,
36+
EmptySubscription, FieldResult, GraphQLEnum, GraphQLInputObject,
37+
GraphQLObject, ScalarValue, graphql_object,
3838
};
3939
#
4040
# struct DatabasePool;
@@ -162,8 +162,8 @@ To actually serve the [schema], see the guides for our various [server integrati
162162
# // Only needed due to 2018 edition because the macro is not accessible.
163163
# #[macro_use] extern crate juniper;
164164
use juniper::{
165-
graphql_object, graphql_value, EmptyMutation, EmptySubscription,
166-
GraphQLEnum, Variables,
165+
EmptyMutation, EmptySubscription, GraphQLEnum, Variables,
166+
graphql_object, graphql_value,
167167
};
168168

169169
#[derive(GraphQLEnum, Clone, Copy)]

0 commit comments

Comments
 (0)