Skip to content

Commit d6bdfac

Browse files
jayvdbrobjtede
andauthored
build(deps): update derive_more to v1.0 (#3453)
* build(deps): update derive_more to v1.0 * refactor: use from derive module --------- Co-authored-by: Rob Ede <[email protected]>
1 parent 78ac5cf commit d6bdfac

40 files changed

+204
-194
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ homepage = "https://actix.rs"
1919
repository = "https://github.com/actix/actix-web"
2020
license = "MIT OR Apache-2.0"
2121
edition = "2021"
22-
rust-version = "1.72"
22+
rust-version = "1.75"
2323

2424
[profile.dev]
2525
# Disabling debug info speeds up builds a bunch and we don't rely on it for debugging that much.

actix-files/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Minimum supported Rust version (MSRV) is now 1.75.
6+
57
## 0.6.6
68

79
- Update `tokio-uring` dependency to `0.4`.

actix-files/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ actix-web = { version = "4", default-features = false }
3333

3434
bitflags = "2"
3535
bytes = "1"
36-
derive_more = "0.99.5"
36+
derive_more = { version = "1", features = ["display", "error", "from"] }
3737
futures-core = { version = "0.3.17", default-features = false, features = ["alloc"] }
3838
http-range = "0.1.4"
3939
log = "0.4"

actix-files/src/error.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
use actix_web::{http::StatusCode, ResponseError};
2-
use derive_more::Display;
2+
use derive_more::derive::Display;
33

44
/// Errors which can occur when serving static files.
55
#[derive(Debug, PartialEq, Eq, Display)]
66
pub enum FilesError {
77
/// Path is not a directory.
88
#[allow(dead_code)]
9-
#[display(fmt = "path is not a directory. Unable to serve static files")]
9+
#[display("path is not a directory. Unable to serve static files")]
1010
IsNotDirectory,
1111

1212
/// Cannot render directory.
13-
#[display(fmt = "unable to render directory without index file")]
13+
#[display("unable to render directory without index file")]
1414
IsDirectory,
1515
}
1616

@@ -25,19 +25,19 @@ impl ResponseError for FilesError {
2525
#[non_exhaustive]
2626
pub enum UriSegmentError {
2727
/// Segment started with the wrapped invalid character.
28-
#[display(fmt = "segment started with invalid character: ('{_0}')")]
28+
#[display("segment started with invalid character: ('{_0}')")]
2929
BadStart(char),
3030

3131
/// Segment contained the wrapped invalid character.
32-
#[display(fmt = "segment contained invalid character ('{_0}')")]
32+
#[display("segment contained invalid character ('{_0}')")]
3333
BadChar(char),
3434

3535
/// Segment ended with the wrapped invalid character.
36-
#[display(fmt = "segment ended with invalid character: ('{_0}')")]
36+
#[display("segment ended with invalid character: ('{_0}')")]
3737
BadEnd(char),
3838

3939
/// Path is not a valid UTF-8 string after percent-decoding.
40-
#[display(fmt = "path is not a valid UTF-8 string after percent-decoding")]
40+
#[display("path is not a valid UTF-8 string after percent-decoding")]
4141
NotValidUtf8,
4242
}
4343

actix-files/src/named.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use actix_web::{
2121
Error, HttpMessage, HttpRequest, HttpResponse, Responder,
2222
};
2323
use bitflags::bitflags;
24-
use derive_more::{Deref, DerefMut};
24+
use derive_more::derive::{Deref, DerefMut};
2525
use futures_core::future::LocalBoxFuture;
2626
use mime::Mime;
2727

actix-files/src/range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::fmt;
22

3-
use derive_more::Error;
3+
use derive_more::derive::Error;
44

55
/// Copy of `http_range::HttpRangeParseError`.
66
#[derive(Debug, Clone)]

actix-http/CHANGES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Minimum supported Rust version (MSRV) is now 1.75.
6+
57
## 3.9.0
68

79
### Added

actix-http/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ ahash = "0.8"
110110
bitflags = "2"
111111
bytes = "1"
112112
bytestring = "1"
113-
derive_more = "0.99.5"
113+
derive_more = { version = "1", features = ["as_ref", "deref", "deref_mut", "display", "error", "from"] }
114114
encoding_rs = "0.8"
115115
futures-core = { version = "0.3.17", default-features = false, features = ["alloc"] }
116116
http = "0.2.7"
@@ -160,7 +160,7 @@ rcgen = "0.13"
160160
regex = "1.3"
161161
rustversion = "1"
162162
rustls-pemfile = "2"
163-
serde = { version = "1.0", features = ["derive"] }
163+
serde = { version = "1", features = ["derive"] }
164164
serde_json = "1.0"
165165
static_assertions = "1"
166166
tls-openssl = { package = "openssl", version = "0.10.55" }

actix-http/src/body/body_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ mod tests {
7575
time::{sleep, Sleep},
7676
};
7777
use actix_utils::future::poll_fn;
78-
use derive_more::{Display, Error};
78+
use derive_more::derive::{Display, Error};
7979
use futures_core::ready;
8080
use futures_util::{stream, FutureExt as _};
8181
use pin_project_lite::pin_project;
@@ -131,7 +131,7 @@ mod tests {
131131
assert_eq!(to_bytes(body).await.ok(), Some(Bytes::from("12")));
132132
}
133133
#[derive(Debug, Display, Error)]
134-
#[display(fmt = "stream error")]
134+
#[display("stream error")]
135135
struct StreamErr;
136136

137137
#[actix_rt::test]

actix-http/src/body/utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::task::Poll;
33
use actix_rt::pin;
44
use actix_utils::future::poll_fn;
55
use bytes::{Bytes, BytesMut};
6-
use derive_more::{Display, Error};
6+
use derive_more::derive::{Display, Error};
77
use futures_core::ready;
88

99
use super::{BodySize, MessageBody};
@@ -38,7 +38,7 @@ pub async fn to_bytes<B: MessageBody>(body: B) -> Result<Bytes, B::Error> {
3838

3939
/// Error type returned from [`to_bytes_limited`] when body produced exceeds limit.
4040
#[derive(Debug, Display, Error)]
41-
#[display(fmt = "limit exceeded while collecting body bytes")]
41+
#[display("limit exceeded while collecting body bytes")]
4242
#[non_exhaustive]
4343
pub struct BodyLimitExceeded;
4444

0 commit comments

Comments
 (0)