Skip to content

Commit

Permalink
chore: fmt project
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Dec 29, 2024
1 parent 23f797a commit ecba6e2
Show file tree
Hide file tree
Showing 28 changed files with 104 additions and 104 deletions.
7 changes: 4 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
## PR Type

<!-- What kind of change does this PR make? -->
<!-- Bug Fix / Feature / Refactor / Code Style / Other -->
INSERT_PR_TYPE

INSERT_PR_TYPE

## PR Checklist

Check your PR fulfills the following:

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


## Overview

<!-- Describe the current and new behavior. -->
<!-- Emphasize any breaking changes. -->


<!-- If this PR fixes or closes an issue, reference it here. -->
<!-- Closes #000 -->
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup mold linker
if: matrix.target.os == 'ubuntu-latest'
uses: rui314/setup-mold@v1

- name: Install nasm
if: matrix.target.os == 'windows-latest'
uses: ilammy/[email protected]
Expand Down
29 changes: 29 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
exclude = ["target/*"]
include = ["**/*.toml"]

[formatting]
column_width = 110

[[rule]]
include = ["**/Cargo.toml"]
keys = [
"dependencies",
"*-dependencies",
"workspace.dependencies",
"workspace.*-dependencies",
"target.*.dependencies",
"target.*.*-dependencies",
]
formatting.reorder_keys = true

[[rule]]
include = ["**/Cargo.toml"]
keys = [
"dependencies.*",
"*-dependencies.*",
"workspace.dependencies.*",
"workspace.*-dependencies.*",
"target.*.dependencies",
"target.*.*-dependencies",
]
formatting.reorder_keys = false
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,9 @@ local-waker = { path = "local-waker" }
lto = true
opt-level = 3
codegen-units = 1

[workspace.lints.rust]
rust_2018_idioms = "deny"
nonstandard-style = "deny"
future_incompatible = "deny"
missing_docs = { level = "warn", priority = -1 }
16 changes: 5 additions & 11 deletions actix-codec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[package]
name = "actix-codec"
version = "0.5.2"
authors = [
"Nikolay Kim <[email protected]>",
"Rob Ede <[email protected]>",
]
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
description = "Codec utilities for working with framed protocols"
keywords = ["network", "framework", "async", "futures"]
repository = "https://github.com/actix/actix-net"
Expand All @@ -14,13 +11,7 @@ edition.workspace = true
rust-version.workspace = true

[package.metadata.cargo_check_external_types]
allowed_external_types = [
"bytes::*",
"futures_core::*",
"futures_sink::*",
"tokio::*",
"tokio_util::*",
]
allowed_external_types = ["bytes::*", "futures_core::*", "futures_sink::*", "tokio::*", "tokio_util::*"]

[dependencies]
bitflags = "2"
Expand All @@ -40,3 +31,6 @@ tokio-test = "0.4.2"
[[bench]]
name = "lines"
harness = false

[lints]
workspace = true
2 changes: 2 additions & 0 deletions actix-codec/benches/lines.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(missing_docs)]

use bytes::BytesMut;
use criterion::{criterion_group, criterion_main, Criterion};

Expand Down
2 changes: 0 additions & 2 deletions actix-codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
//! [`Sink`]: futures_sink::Sink
//! [`Stream`]: futures_core::Stream
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible, missing_docs)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

Expand Down
11 changes: 7 additions & 4 deletions actix-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "actix-macros"
version = "0.2.4"
authors = [
"Nikolay Kim <[email protected]>",
"Ibraheem Ahmed <[email protected]>",
"Rob Ede <[email protected]>",
"Nikolay Kim <[email protected]>",
"Ibraheem Ahmed <[email protected]>",
"Rob Ede <[email protected]>",
]
description = "Macros for Actix system and runtime"
repository = "https://github.com/actix/actix-net"
Expand All @@ -15,7 +15,7 @@ rust-version.workspace = true

[package.metadata.cargo-machete]
ignored = [
"proc_macro2", # specified for minimal versions compat
"proc_macro2", # specified for minimal versions compat
]

[lib]
Expand All @@ -34,3 +34,6 @@ actix-rt = "2"
futures-util = { version = "0.3.17", default-features = false }
rustversion-msrv = "0.100"
trybuild = "1"

[lints]
workspace = true
2 changes: 0 additions & 2 deletions actix-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
//! # Tests
//! See docs for the [`#[test]`](macro@test) macro.
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

Expand Down
13 changes: 5 additions & 8 deletions actix-rt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[package]
name = "actix-rt"
version = "2.10.0"
authors = [
"Nikolay Kim <[email protected]>",
"Rob Ede <[email protected]>",
]
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
description = "Tokio-based single-threaded async runtime for the Actix ecosystem"
keywords = ["async", "futures", "io", "runtime"]
homepage = "https://actix.rs"
Expand All @@ -15,10 +12,7 @@ edition.workspace = true
rust-version.workspace = true

[package.metadata.cargo_check_external_types]
allowed_external_types = [
"actix_macros::*",
"tokio::*",
]
allowed_external_types = ["actix_macros::*", "tokio::*"]

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

[dev-dependencies]
tokio = { version = "1.23.1", features = ["full"] }

[lints]
workspace = true
2 changes: 0 additions & 2 deletions actix-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
//! Note that there are currently some unimplemented parts of using `actix-rt` with `io-uring`.
//! In particular, when running a `System`, only `System::block_on` is supported.
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible, missing_docs)]
#![allow(clippy::type_complexity)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
Expand Down
16 changes: 8 additions & 8 deletions actix-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "actix-server"
version = "2.5.0"
authors = [
"Nikolay Kim <[email protected]>",
"Rob Ede <[email protected]>",
"Ali MJ Al-Nasrawy <[email protected]>",
"Nikolay Kim <[email protected]>",
"Rob Ede <[email protected]>",
"Ali MJ Al-Nasrawy <[email protected]>",
]
description = "General purpose TCP server built for the Actix ecosystem"
keywords = ["network", "tcp", "server", "framework", "async"]
Expand All @@ -16,9 +16,7 @@ edition.workspace = true
rust-version.workspace = true

[package.metadata.cargo_check_external_types]
allowed_external_types = [
"tokio::*",
]
allowed_external_types = ["tokio::*"]

[features]
default = []
Expand All @@ -28,7 +26,6 @@ io-uring = ["tokio-uring", "actix-rt/io-uring"]
actix-rt = { version = "2.10", default-features = false }
actix-service = "2"
actix-utils = "3"

futures-core = { version = "0.3.17", default-features = false, features = ["alloc"] }
futures-util = { version = "0.3.17", default-features = false, features = ["alloc"] }
mio = { version = "1", features = ["os-poll", "net"] }
Expand All @@ -45,6 +42,9 @@ actix-codec = "0.5"
actix-rt = "2.8"

bytes = "1"
pretty_env_logger = "0.5"
futures-util = { version = "0.3.17", default-features = false, features = ["sink", "async-await-macro"] }
pretty_env_logger = "0.5"
tokio = { version = "1.23.1", features = ["io-util", "rt-multi-thread", "macros", "fs"] }

[lints]
workspace = true
2 changes: 2 additions & 0 deletions actix-server/examples/file-reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
//!
//! Follow the prompt and enter a file path, relative or absolute.
#![allow(missing_docs)]

use std::io;

use actix_codec::{Framed, LinesCodec};
Expand Down
2 changes: 0 additions & 2 deletions actix-server/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! General purpose TCP server.
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

Expand Down
1 change: 1 addition & 0 deletions actix-server/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ pub enum MioStream {

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

Expand Down
8 changes: 4 additions & 4 deletions actix-service/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[package]
name = "actix-service"
version = "2.0.2"
authors = [
"Nikolay Kim <[email protected]>",
"Rob Ede <[email protected]>",
]
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
description = "Service trait and combinators for representing asynchronous request/response operations."
keywords = ["network", "framework", "async", "futures", "service"]
categories = ["network-programming", "asynchronous", "no-std"]
Expand All @@ -22,3 +19,6 @@ pin-project-lite = "0.2"
actix-rt = "2"
actix-utils = "3"
futures-util = { version = "0.3.17", default-features = false }

[lints]
workspace = true
2 changes: 2 additions & 0 deletions actix-service/examples/clone.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(missing_docs)]

use std::{future::Future, sync::mpsc, time::Duration};

async fn oracle<F, Fut>(f: F) -> (u32, u32)
Expand Down
2 changes: 0 additions & 2 deletions actix-service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! See [`Service`] docs for information on this crate's foundational trait.
#![no_std]
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible, missing_docs)]
#![allow(clippy::type_complexity)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
Expand Down
24 changes: 9 additions & 15 deletions actix-tls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[package]
name = "actix-tls"
version = "3.4.0"
authors = [
"Nikolay Kim <[email protected]>",
"Rob Ede <[email protected]>",
]
authors = ["Nikolay Kim <[email protected]>", "Rob Ede <[email protected]>"]
description = "TLS acceptor and connector services for Actix ecosystem"
keywords = ["network", "tls", "ssl", "async", "transport"]
repository = "https://github.com/actix/actix-net.git"
Expand All @@ -18,17 +15,12 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.cargo_check_external_types]
allowed_external_types = [
"actix_service::*",
"actix_utils::*",
"futures_core::*",
"tokio::*",
]
allowed_external_types = ["actix_service::*", "actix_utils::*", "futures_core::*", "tokio::*"]

[package.metadata.cargo-machete]
ignored = [
"rustls_021", # specified to force version with add_trust_anchors method
"rustls_webpki_0101", # specified to force secure version
"rustls_021", # specified to force version with add_trust_anchors method
"rustls_webpki_0101", # specified to force secure version
]

[features]
Expand Down Expand Up @@ -76,7 +68,6 @@ uri = ["dep:http-0_2", "dep:http-1"]
actix-rt = { version = "2.2", default-features = false }
actix-service = "2"
actix-utils = "3"

futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
impl-more = "0.1"
pin-project-lite = "0.2.7"
Expand Down Expand Up @@ -120,17 +111,17 @@ rustls-native-certs-07 = { package = "rustls-native-certs", version = "0.7", opt
tokio-native-tls = { version = "0.3", optional = true }

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

[dev-dependencies]
actix-codec = "0.5"
actix-rt = "2.2"
actix-server = "2"
bytes = "1"
pretty_env_logger = "0.5"
futures-util = { version = "0.3.17", default-features = false, features = ["sink"] }
itertools = "0.13"
pretty_env_logger = "0.5"
rcgen = "0.13"
rustls-pemfile = "2"
tokio-rustls-026 = { package = "tokio-rustls", version = "0.26" }
Expand All @@ -139,3 +130,6 @@ trust-dns-resolver = "0.23"
[[example]]
name = "accept-rustls"
required-features = ["accept", "rustls-0_23"]

[lints]
workspace = true
2 changes: 0 additions & 2 deletions actix-tls/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! TLS acceptor and connector services for the Actix ecosystem.
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible, missing_docs)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
Expand Down
Loading

0 comments on commit ecba6e2

Please sign in to comment.