From 011330d8913e318ea2adf2a0751fca284daaddb3 Mon Sep 17 00:00:00 2001 From: vshengbro Date: Fri, 9 Oct 2026 21:24:25 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20exempt=20const-table=20files=20via=20r?= =?UTF-8?q?ust-standards.toml,=20hoist=20tests-tree=20imports=20(=C2=A718,?= =?UTF-8?q?=20=C2=A76.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per the 2026-10-09 rulings: - rust-standards.toml pub_const_exempt lists the 11 constant-table files (repo-relative path globs): the 9 files behind check 49's 30 violations plus stripe-pay-core protocol and chunkify const.rs, which are the same const-table shape (their constants were in the unwired report). - check 26 now covers tests trees: stripe-pay-server/client roots gain the crate glob (inner mod.rs drop their own), stripe-pay-core payment drops the redundant narrowed crate import (the root glob already covers it), tcp/udp-request roots absorb the request_builder std blocks. audit 51/51, clippy 0 warnings, cargo check --all-targets clean, fmt clean. --- rust-standards.toml | 13 +++++++++++++ stripe-pay-client/tests/element/mod.rs | 2 +- stripe-pay-client/tests/mod.rs | 2 ++ stripe-pay-client/tests/mount/mod.rs | 2 +- stripe-pay-core/tests/payment/mod.rs | 2 -- stripe-pay-server/tests/mod.rs | 2 ++ stripe-pay-server/tests/signature/mod.rs | 2 +- stripe-pay-server/tests/wire/mod.rs | 2 +- tcp-request/tests/mod.rs | 6 +++++- tcp-request/tests/request_builder/mod.rs | 6 ------ udp-request/tests/mod.rs | 6 +++++- udp-request/tests/request_builder/mod.rs | 6 ------ 12 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 rust-standards.toml diff --git a/rust-standards.toml b/rust-standards.toml new file mode 100644 index 00000000..4520397b --- /dev/null +++ b/rust-standards.toml @@ -0,0 +1,13 @@ +pub_const_exempt = [ + "color-log/src/const.rs", + "tcp-request/src/common/const.rs", + "stripe-pay-core/src/protocol/const.rs", + "stripe-pay-server/src/signature/const.rs", + "udp-request/src/common/const.rs", + "tcplane/src/common/const.rs", + "udp/src/config/const.rs", + "tokio-broadcast/src/broadcast/const.rs", + "stripe-pay-client/src/host/const.rs", + "chunkify/src/const.rs", + "crate-cli/src/manifest/const.rs", +] diff --git a/stripe-pay-client/tests/element/mod.rs b/stripe-pay-client/tests/element/mod.rs index 46c44589..e41822a8 100644 --- a/stripe-pay-client/tests/element/mod.rs +++ b/stripe-pay-client/tests/element/mod.rs @@ -1,3 +1,3 @@ mod r#fn; -use stripe_pay_client::*; +use super::*; diff --git a/stripe-pay-client/tests/mod.rs b/stripe-pay-client/tests/mod.rs index 3e894f1d..c4c771fd 100644 --- a/stripe-pay-client/tests/mod.rs +++ b/stripe-pay-client/tests/mod.rs @@ -1,2 +1,4 @@ mod element; mod mount; + +use stripe_pay_client::*; diff --git a/stripe-pay-client/tests/mount/mod.rs b/stripe-pay-client/tests/mount/mod.rs index 46c44589..e41822a8 100644 --- a/stripe-pay-client/tests/mount/mod.rs +++ b/stripe-pay-client/tests/mount/mod.rs @@ -1,3 +1,3 @@ mod r#fn; -use stripe_pay_client::*; +use super::*; diff --git a/stripe-pay-core/tests/payment/mod.rs b/stripe-pay-core/tests/payment/mod.rs index 681d19a8..0c3ea80c 100644 --- a/stripe-pay-core/tests/payment/mod.rs +++ b/stripe-pay-core/tests/payment/mod.rs @@ -2,6 +2,4 @@ mod r#fn; mod method; mod transition; -use stripe_pay_core::{CardBrand, CardDetails, PaymentIntentStatus, StripeParseError}; - use super::*; diff --git a/stripe-pay-server/tests/mod.rs b/stripe-pay-server/tests/mod.rs index f99fd191..2fd7875b 100644 --- a/stripe-pay-server/tests/mod.rs +++ b/stripe-pay-server/tests/mod.rs @@ -1,2 +1,4 @@ mod signature; mod wire; + +use stripe_pay_server::*; diff --git a/stripe-pay-server/tests/signature/mod.rs b/stripe-pay-server/tests/signature/mod.rs index 0b8551cf..e41822a8 100644 --- a/stripe-pay-server/tests/signature/mod.rs +++ b/stripe-pay-server/tests/signature/mod.rs @@ -1,3 +1,3 @@ mod r#fn; -use stripe_pay_server::*; +use super::*; diff --git a/stripe-pay-server/tests/wire/mod.rs b/stripe-pay-server/tests/wire/mod.rs index 0b8551cf..e41822a8 100644 --- a/stripe-pay-server/tests/wire/mod.rs +++ b/stripe-pay-server/tests/wire/mod.rs @@ -1,3 +1,3 @@ mod r#fn; -use stripe_pay_server::*; +use super::*; diff --git a/tcp-request/tests/mod.rs b/tcp-request/tests/mod.rs index 420236fc..2f545edd 100644 --- a/tcp-request/tests/mod.rs +++ b/tcp-request/tests/mod.rs @@ -1,4 +1,8 @@ mod request_builder; -use std::time::Duration; +use std::{ + sync::{Arc, Mutex}, + thread::{JoinHandle, spawn}, + time::{Duration, Instant}, +}; use tcp_request::*; diff --git a/tcp-request/tests/request_builder/mod.rs b/tcp-request/tests/request_builder/mod.rs index 0ab72060..e41822a8 100644 --- a/tcp-request/tests/request_builder/mod.rs +++ b/tcp-request/tests/request_builder/mod.rs @@ -1,9 +1,3 @@ mod r#fn; use super::*; - -use std::{ - sync::{Arc, Mutex}, - thread::{JoinHandle, spawn}, - time::Instant, -}; diff --git a/udp-request/tests/mod.rs b/udp-request/tests/mod.rs index 7d4299b9..5e0ab510 100644 --- a/udp-request/tests/mod.rs +++ b/udp-request/tests/mod.rs @@ -1,4 +1,8 @@ mod request_builder; -use std::time::Duration; +use std::{ + sync::{Arc, Mutex}, + thread::{JoinHandle, spawn}, + time::{Duration, Instant}, +}; use udp_request::*; diff --git a/udp-request/tests/request_builder/mod.rs b/udp-request/tests/request_builder/mod.rs index 0ab72060..e41822a8 100644 --- a/udp-request/tests/request_builder/mod.rs +++ b/udp-request/tests/request_builder/mod.rs @@ -1,9 +1,3 @@ mod r#fn; use super::*; - -use std::{ - sync::{Arc, Mutex}, - thread::{JoinHandle, spawn}, - time::Instant, -};