Skip to content

Commit ecba6e2

Browse files
committed
chore: fmt project
1 parent 23f797a commit ecba6e2

File tree

28 files changed

+104
-104
lines changed

28 files changed

+104
-104
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
## PR Type
2+
23
<!-- What kind of change does this PR make? -->
34
<!-- Bug Fix / Feature / Refactor / Code Style / Other -->
4-
INSERT_PR_TYPE
55

6+
INSERT_PR_TYPE
67

78
## PR Checklist
9+
810
Check your PR fulfills the following:
911

1012
<!-- For draft PRs check the boxes as you complete them. -->
@@ -14,11 +16,10 @@ Check your PR fulfills the following:
1416
- [ ] A changelog entry has been made for the appropriate packages.
1517
- [ ] Format code with the latest stable rustfmt
1618

17-
1819
## Overview
20+
1921
<!-- Describe the current and new behavior. -->
2022
<!-- Emphasize any breaking changes. -->
2123

22-
2324
<!-- If this PR fixes or closes an issue, reference it here. -->
2425
<!-- Closes #000 -->

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup mold linker
5454
if: matrix.target.os == 'ubuntu-latest'
5555
uses: rui314/setup-mold@v1
56-
56+
5757
- name: Install nasm
5858
if: matrix.target.os == 'windows-latest'
5959
uses: ilammy/[email protected]

.taplo.toml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
exclude = ["target/*"]
2+
include = ["**/*.toml"]
3+
4+
[formatting]
5+
column_width = 110
6+
7+
[[rule]]
8+
include = ["**/Cargo.toml"]
9+
keys = [
10+
"dependencies",
11+
"*-dependencies",
12+
"workspace.dependencies",
13+
"workspace.*-dependencies",
14+
"target.*.dependencies",
15+
"target.*.*-dependencies",
16+
]
17+
formatting.reorder_keys = true
18+
19+
[[rule]]
20+
include = ["**/Cargo.toml"]
21+
keys = [
22+
"dependencies.*",
23+
"*-dependencies.*",
24+
"workspace.dependencies.*",
25+
"workspace.*-dependencies.*",
26+
"target.*.dependencies",
27+
"target.*.*-dependencies",
28+
]
29+
formatting.reorder_keys = false

Cargo.toml

+6
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ local-waker = { path = "local-waker" }
3636
lto = true
3737
opt-level = 3
3838
codegen-units = 1
39+
40+
[workspace.lints.rust]
41+
rust_2018_idioms = "deny"
42+
nonstandard-style = "deny"
43+
future_incompatible = "deny"
44+
missing_docs = { level = "warn", priority = -1 }

actix-codec/Cargo.toml

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
[package]
22
name = "actix-codec"
33
version = "0.5.2"
4-
authors = [
5-
"Nikolay Kim <[email protected]>",
6-
"Rob Ede <[email protected]>",
7-
]
4+
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
85
description = "Codec utilities for working with framed protocols"
96
keywords = ["network", "framework", "async", "futures"]
107
repository = "https://github.com/actix/actix-net"
@@ -14,13 +11,7 @@ edition.workspace = true
1411
rust-version.workspace = true
1512

1613
[package.metadata.cargo_check_external_types]
17-
allowed_external_types = [
18-
"bytes::*",
19-
"futures_core::*",
20-
"futures_sink::*",
21-
"tokio::*",
22-
"tokio_util::*",
23-
]
14+
allowed_external_types = ["bytes::*", "futures_core::*", "futures_sink::*", "tokio::*", "tokio_util::*"]
2415

2516
[dependencies]
2617
bitflags = "2"
@@ -40,3 +31,6 @@ tokio-test = "0.4.2"
4031
[[bench]]
4132
name = "lines"
4233
harness = false
34+
35+
[lints]
36+
workspace = true

actix-codec/benches/lines.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(missing_docs)]
2+
13
use bytes::BytesMut;
24
use criterion::{criterion_group, criterion_main, Criterion};
35

actix-codec/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//! [`Sink`]: futures_sink::Sink
77
//! [`Stream`]: futures_core::Stream
88
9-
#![deny(rust_2018_idioms, nonstandard_style)]
10-
#![warn(future_incompatible, missing_docs)]
119
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
1210
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
1311

actix-macros/Cargo.toml

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
name = "actix-macros"
33
version = "0.2.4"
44
authors = [
5-
"Nikolay Kim <[email protected]>",
6-
"Ibraheem Ahmed <[email protected]>",
7-
"Rob Ede <[email protected]>",
5+
"Nikolay Kim <[email protected]>",
6+
"Ibraheem Ahmed <[email protected]>",
7+
"Rob Ede <[email protected]>",
88
]
99
description = "Macros for Actix system and runtime"
1010
repository = "https://github.com/actix/actix-net"
@@ -15,7 +15,7 @@ rust-version.workspace = true
1515

1616
[package.metadata.cargo-machete]
1717
ignored = [
18-
"proc_macro2", # specified for minimal versions compat
18+
"proc_macro2", # specified for minimal versions compat
1919
]
2020

2121
[lib]
@@ -34,3 +34,6 @@ actix-rt = "2"
3434
futures-util = { version = "0.3.17", default-features = false }
3535
rustversion-msrv = "0.100"
3636
trybuild = "1"
37+
38+
[lints]
39+
workspace = true

actix-macros/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
//! # Tests
99
//! See docs for the [`#[test]`](macro@test) macro.
1010
11-
#![deny(rust_2018_idioms, nonstandard_style)]
12-
#![warn(future_incompatible)]
1311
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
1412
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
1513

actix-rt/Cargo.toml

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
[package]
22
name = "actix-rt"
33
version = "2.10.0"
4-
authors = [
5-
"Nikolay Kim <[email protected]>",
6-
"Rob Ede <[email protected]>",
7-
]
4+
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
85
description = "Tokio-based single-threaded async runtime for the Actix ecosystem"
96
keywords = ["async", "futures", "io", "runtime"]
107
homepage = "https://actix.rs"
@@ -15,10 +12,7 @@ edition.workspace = true
1512
rust-version.workspace = true
1613

1714
[package.metadata.cargo_check_external_types]
18-
allowed_external_types = [
19-
"actix_macros::*",
20-
"tokio::*",
21-
]
15+
allowed_external_types = ["actix_macros::*", "tokio::*"]
2216

2317
[features]
2418
default = ["macros"]
@@ -37,3 +31,6 @@ tokio-uring = { version = "0.5", optional = true }
3731

3832
[dev-dependencies]
3933
tokio = { version = "1.23.1", features = ["full"] }
34+
35+
[lints]
36+
workspace = true

actix-rt/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@
4141
//! Note that there are currently some unimplemented parts of using `actix-rt` with `io-uring`.
4242
//! In particular, when running a `System`, only `System::block_on` is supported.
4343
44-
#![deny(rust_2018_idioms, nonstandard_style)]
45-
#![warn(future_incompatible, missing_docs)]
4644
#![allow(clippy::type_complexity)]
4745
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
4846
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

actix-server/Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
name = "actix-server"
33
version = "2.5.0"
44
authors = [
5-
"Nikolay Kim <[email protected]>",
6-
"Rob Ede <[email protected]>",
7-
"Ali MJ Al-Nasrawy <[email protected]>",
5+
"Nikolay Kim <[email protected]>",
6+
"Rob Ede <[email protected]>",
7+
"Ali MJ Al-Nasrawy <[email protected]>",
88
]
99
description = "General purpose TCP server built for the Actix ecosystem"
1010
keywords = ["network", "tcp", "server", "framework", "async"]
@@ -16,9 +16,7 @@ edition.workspace = true
1616
rust-version.workspace = true
1717

1818
[package.metadata.cargo_check_external_types]
19-
allowed_external_types = [
20-
"tokio::*",
21-
]
19+
allowed_external_types = ["tokio::*"]
2220

2321
[features]
2422
default = []
@@ -28,7 +26,6 @@ io-uring = ["tokio-uring", "actix-rt/io-uring"]
2826
actix-rt = { version = "2.10", default-features = false }
2927
actix-service = "2"
3028
actix-utils = "3"
31-
3229
futures-core = { version = "0.3.17", default-features = false, features = ["alloc"] }
3330
futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] }
3431
mio = { version = "1", features = ["os-poll", "net"] }
@@ -45,6 +42,9 @@ actix-codec = "0.5"
4542
actix-rt = "2.8"
4643

4744
bytes = "1"
48-
pretty_env_logger = "0.5"
4945
futures-util = { version = "0.3.17", default-features = false, features = ["sink", "async-await-macro"] }
46+
pretty_env_logger = "0.5"
5047
tokio = { version = "1.23.1", features = ["io-util", "rt-multi-thread", "macros", "fs"] }
48+
49+
[lints]
50+
workspace = true

actix-server/examples/file-reader.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
//!
99
//! Follow the prompt and enter a file path, relative or absolute.
1010
11+
#![allow(missing_docs)]
12+
1113
use std::io;
1214

1315
use actix_codec::{Framed, LinesCodec};

actix-server/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! General purpose TCP server.
22
3-
#![deny(rust_2018_idioms, nonstandard_style)]
4-
#![warn(future_incompatible)]
53
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
64
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
75

actix-server/src/socket.rs

+1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ pub enum MioStream {
160160

161161
/// Helper trait for converting a Mio stream into a Tokio stream.
162162
pub trait FromStream: Sized {
163+
/// Creates stream from a `mio` stream.
163164
fn from_mio(sock: MioStream) -> io::Result<Self>;
164165
}
165166

actix-service/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
[package]
22
name = "actix-service"
33
version = "2.0.2"
4-
authors = [
5-
"Nikolay Kim <[email protected]>",
6-
"Rob Ede <[email protected]>",
7-
]
4+
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
85
description = "Service trait and combinators for representing asynchronous request/response operations."
96
keywords = ["network", "framework", "async", "futures", "service"]
107
categories = ["network-programming", "asynchronous", "no-std"]
@@ -22,3 +19,6 @@ pin-project-lite = "0.2"
2219
actix-rt = "2"
2320
actix-utils = "3"
2421
futures-util = { version = "0.3.17", default-features = false }
22+
23+
[lints]
24+
workspace = true

actix-service/examples/clone.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(missing_docs)]
2+
13
use std::{future::Future, sync::mpsc, time::Duration};
24

35
async fn oracle<F, Fut>(f: F) -> (u32, u32)

actix-service/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! See [`Service`] docs for information on this crate's foundational trait.
22
33
#![no_std]
4-
#![deny(rust_2018_idioms, nonstandard_style)]
5-
#![warn(future_incompatible, missing_docs)]
64
#![allow(clippy::type_complexity)]
75
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
86
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

actix-tls/Cargo.toml

+9-15
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
[package]
22
name = "actix-tls"
33
version = "3.4.0"
4-
authors = [
5-
"Nikolay Kim <[email protected]>",
6-
"Rob Ede <[email protected]>",
7-
]
4+
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
85
description = "TLS acceptor and connector services for Actix ecosystem"
96
keywords = ["network", "tls", "ssl", "async", "transport"]
107
repository = "https://github.com/actix/actix-net.git"
@@ -18,17 +15,12 @@ all-features = true
1815
rustdoc-args = ["--cfg", "docsrs"]
1916

2017
[package.metadata.cargo_check_external_types]
21-
allowed_external_types = [
22-
"actix_service::*",
23-
"actix_utils::*",
24-
"futures_core::*",
25-
"tokio::*",
26-
]
18+
allowed_external_types = ["actix_service::*", "actix_utils::*", "futures_core::*", "tokio::*"]
2719

2820
[package.metadata.cargo-machete]
2921
ignored = [
30-
"rustls_021", # specified to force version with add_trust_anchors method
31-
"rustls_webpki_0101", # specified to force secure version
22+
"rustls_021", # specified to force version with add_trust_anchors method
23+
"rustls_webpki_0101", # specified to force secure version
3224
]
3325

3426
[features]
@@ -76,7 +68,6 @@ uri = ["dep:http-0_2", "dep:http-1"]
7668
actix-rt = { version = "2.2", default-features = false }
7769
actix-service = "2"
7870
actix-utils = "3"
79-
8071
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
8172
impl-more = "0.1"
8273
pin-project-lite = "0.2.7"
@@ -120,17 +111,17 @@ rustls-native-certs-07 = { package = "rustls-native-certs", version = "0.7", opt
120111
tokio-native-tls = { version = "0.3", optional = true }
121112

122113
[target.'cfg(any())'.dependencies]
123-
rustls-021 = { package = "rustls", version = "0.21.6", optional = true } # force version with add_trust_anchors method
114+
rustls-021 = { package = "rustls", version = "0.21.6", optional = true } # force version with add_trust_anchors method
124115
rustls-webpki-0101 = { package = "rustls-webpki", version = "0.101.4", optional = true } # force secure version
125116

126117
[dev-dependencies]
127118
actix-codec = "0.5"
128119
actix-rt = "2.2"
129120
actix-server = "2"
130121
bytes = "1"
131-
pretty_env_logger = "0.5"
132122
futures-util = { version = "0.3.17", default-features = false, features = ["sink"] }
133123
itertools = "0.13"
124+
pretty_env_logger = "0.5"
134125
rcgen = "0.13"
135126
rustls-pemfile = "2"
136127
tokio-rustls-026 = { package = "tokio-rustls", version = "0.26" }
@@ -139,3 +130,6 @@ trust-dns-resolver = "0.23"
139130
[[example]]
140131
name = "accept-rustls"
141132
required-features = ["accept", "rustls-0_23"]
133+
134+
[lints]
135+
workspace = true

actix-tls/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! TLS acceptor and connector services for the Actix ecosystem.
22
3-
#![deny(rust_2018_idioms, nonstandard_style)]
4-
#![warn(future_incompatible, missing_docs)]
53
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
64
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
75
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

0 commit comments

Comments
 (0)