Skip to content

Commit b433e16

Browse files
committed
perf: upgrade rust editon from 2021 to 2024
1 parent cc5bc74 commit b433e16

File tree

14 files changed

+19
-20
lines changed

14 files changed

+19
-20
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "backend"
33
description = "Backend API and services for StackClass"
4-
version = "0.18.0"
5-
edition = "2021"
4+
version = "0.19.0"
5+
edition = "2024"
66

77
default-run = "stackclass-server"
88

openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": {
77
"name": ""
88
},
9-
"version": "0.18.0"
9+
"version": "0.19.0"
1010
},
1111
"paths": {
1212
"/v1/courses": {

src/database.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
use crate::errors::Result;
16-
use sqlx::{pool::PoolOptions, Pool, Postgres};
16+
use sqlx::{Pool, Postgres, pool::PoolOptions};
1717

1818
pub type Transaction<'a> = sqlx::Transaction<'a, Postgres>;
1919

src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
// limitations under the License.
1414

1515
use axum::{
16+
Json,
1617
http::{self, StatusCode},
1718
response::{IntoResponse, Response},
18-
Json,
1919
};
2020
use serde_json::json;
2121
use thiserror::Error;

src/extractor.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
use std::{collections::HashMap, fmt::Display, sync::Arc};
1616

1717
use axum::{
18+
RequestPartsExt,
1819
extract::FromRequestParts,
19-
http::{request::Parts, StatusCode},
20+
http::{StatusCode, request::Parts},
2021
response::{IntoResponse, Response},
21-
RequestPartsExt,
2222
};
2323
use axum_extra::{
24-
headers::{authorization::Bearer, Authorization},
2524
TypedHeader,
25+
headers::{Authorization, authorization::Bearer},
2626
};
2727
use jsonwebtoken::{
28-
decode,
28+
Algorithm, DecodingKey, Validation, decode,
2929
jwk::{AlgorithmParameters, Jwk},
30-
Algorithm, DecodingKey, Validation,
3130
};
3231
use serde::{Deserialize, Serialize};
3332
use thiserror::Error;

src/handler/course.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
use std::sync::Arc;
1616

1717
use axum::{
18+
Json,
1819
extract::{Path, State},
1920
http::StatusCode,
2021
response::IntoResponse,
21-
Json,
2222
};
2323

2424
use crate::{

src/handler/extension.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
// limitations under the License.
1414

1515
use axum::{
16+
Json,
1617
extract::{Path, State},
1718
http::StatusCode,
1819
response::IntoResponse,
19-
Json,
2020
};
2121
use std::sync::Arc;
2222

src/handler/git.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::{
2020
use axum::{
2121
body::Bytes,
2222
extract::{Path, Query, State},
23-
http::{header, StatusCode},
23+
http::{StatusCode, header},
2424
response::{IntoResponse, Response},
2525
};
2626
use std::{collections::HashMap, sync::Arc};

src/handler/stage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
// limitations under the License.
1414

1515
use axum::{
16+
Json,
1617
extract::{Path, State},
1718
http::StatusCode,
1819
response::IntoResponse,
19-
Json,
2020
};
2121
use std::sync::Arc;
2222

0 commit comments

Comments
 (0)