diff --git a/Cargo.lock b/Cargo.lock index b68a3524..1ab5925d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -106,12 +106,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" - [[package]] name = "android-tzdata" version = "0.1.1" @@ -172,15 +166,6 @@ dependencies = [ "stable_deref_trait", ] -[[package]] -name = "as-slice" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "atomic-polyfill" version = "1.0.3" @@ -190,18 +175,6 @@ dependencies = [ "critical-section", ] -[[package]] -name = "atomic-pool" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c5fc22e05ec2884db458bf307dc7b278c9428888d2b6e6fad9c0ae7804f5f6" -dependencies = [ - "as-slice 0.1.5", - "as-slice 0.2.1", - "atomic-polyfill", - "stable_deref_trait", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -578,7 +551,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", - "const-oid", "crypto-common 0.1.6", "subtle", ] @@ -598,19 +570,6 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", -] - [[package]] name = "elliptic-curve" version = "0.13.8" @@ -632,24 +591,19 @@ dependencies = [ [[package]] name = "embassy-net" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cf91dd36dfd623de32242af711fd294d41159f02130052fc93c5c5ba93febe" +checksum = "49f9f2979069031c153e41075a43074c36a64492e598780b27944a605f829d23" dependencies = [ - "as-slice 0.2.1", - "atomic-pool", "document-features", "embassy-net-driver", "embassy-sync", "embassy-time", "embedded-io-async", "embedded-nal-async", - "futures", - "generic-array 0.14.7", "heapless 0.8.0", "managed", "smoltcp", - "stable_deref_trait", ] [[package]] @@ -660,13 +614,14 @@ checksum = "524eb3c489760508f71360112bca70f6e53173e6fe48fc5f0efd0f5ab217751d" [[package]] name = "embassy-sync" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd938f25c0798db4280fcd8026bf4c2f48789aebf8f77b6e5cf8a7693ba114ec" +checksum = "3899a6e39fa3f54bf8aaf00979f9f9c0145a522f7244810533abbb748be6ce82" dependencies = [ "cfg-if", "critical-section", "embedded-io-async", + "futures-sink", "futures-util", "heapless 0.8.0", ] @@ -746,33 +701,32 @@ dependencies = [ [[package]] name = "embedded-nal" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a943fad5ed3d3f8a00f1e80f6bba371f1e7f0df28ec38477535eb318dc19cc" +checksum = "c56a28be191a992f28f178ec338a0bf02f63d7803244add736d026a471e6ed77" dependencies = [ "nb 1.1.0", - "no-std-net", ] [[package]] name = "embedded-nal-async" -version = "0.7.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72229137a4fc12d239b0b7f50f04b30790678da6d782a0f3f1909bf57ec4b759" +checksum = "76959917cd2b86f40a98c28dd5624eddd1fa69d746241c8257eac428d83cb211" dependencies = [ "embedded-io-async", "embedded-nal", - "no-std-net", ] [[package]] name = "embedded-tls" -version = "0.17.1" -source = "git+https://github.com/drogue-iot/embedded-tls#7936bc11c123260065b5b9776b584308ad2e8f8a" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6efb76fdd004a4ef787640177237b83449e6c5847765ea50bf15900061fd601" dependencies = [ "aes-gcm 0.10.3", + "atomic-polyfill", "digest", - "ecdsa", "embedded-io", "embedded-io-async", "generic-array 0.14.7", @@ -781,10 +735,8 @@ dependencies = [ "hkdf", "hmac", "p256", - "portable-atomic", "rand_core", "sha2", - "signature", "typenum", ] @@ -833,53 +785,12 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - [[package]] name = "futures-core" version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.89", -] - [[package]] name = "futures-sink" version = "0.3.31" @@ -899,8 +810,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-core", - "futures-macro", - "futures-sink", "futures-task", "pin-project-lite", "pin-utils", @@ -1018,11 +927,10 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "allocator-api2", "foldhash", ] @@ -1032,7 +940,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634bd4d29cbf24424d0a4bfcbf80c6960129dc24424752a7d1d1390607023422" dependencies = [ - "as-slice 0.1.5", + "as-slice", "generic-array 0.14.7", "hash32 0.1.1", "stable_deref_trait", @@ -1129,7 +1037,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.1", + "hashbrown 0.15.2", ] [[package]] @@ -1153,9 +1061,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -1183,9 +1091,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.164" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" [[package]] name = "libfuzzer-sys" @@ -1287,12 +1195,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d" -[[package]] -name = "no-std-net" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" - [[package]] name = "nom" version = "7.1.3" @@ -1348,10 +1250,8 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ - "ecdsa", "elliptic-curve", "primeorder", - "sha2", ] [[package]] @@ -1599,16 +1499,6 @@ dependencies = [ "bytecheck", ] -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - [[package]] name = "ring" version = "0.17.8" @@ -1677,9 +1567,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring", @@ -1824,7 +1714,6 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", "rand_core", ] @@ -1842,9 +1731,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smoltcp" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a1a996951e50b5971a2c8c0fa05a381480d70a933064245c4a223ddc87ccc97" +checksum = "dad095989c1533c1c266d9b1e8d70a1329dd3723c3edac6d03bbd67e7bf6f4bb" dependencies = [ "bitflags", "byteorder", @@ -1855,9 +1744,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2053,9 +1942,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -2064,9 +1953,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -2075,9 +1964,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -2384,7 +2273,7 @@ dependencies = [ "fastrand", "flate2", "foldhash", - "hashbrown 0.15.1", + "hashbrown 0.15.2", "hmac", "httparse", "matchit", @@ -2440,7 +2329,7 @@ dependencies = [ [[package]] name = "wtx-macros" -version = "0.3.0" +version = "0.4.0" dependencies = [ "proc-macro2", "quote", diff --git a/wtx-macros/Cargo.toml b/wtx-macros/Cargo.toml index 3fd7b073..beeb6151 100644 --- a/wtx-macros/Cargo.toml +++ b/wtx-macros/Cargo.toml @@ -23,7 +23,7 @@ license = "MIT" name = "wtx-macros" readme = "README.md" repository = "https://github.com/c410-f3r/wtx" -version = "0.3.0" +version = "0.4.0" [package.metadata.docs.rs] all-features = true diff --git a/wtx/Cargo.toml b/wtx/Cargo.toml index 3d3973ff..045ac8cb 100644 --- a/wtx/Cargo.toml +++ b/wtx/Cargo.toml @@ -8,9 +8,9 @@ chrono = { default-features = false, optional = true, version = "0.4" } cl-aux = { default-features = false, optional = true, features = ["alloc"], version = "5.0" } crypto-common = { default-features = false, optional = true, version = "0.1" } digest = { default-features = false, features = ["mac"], optional = true, version = "0.10" } -embassy-net = { default-features = false, features = ["tcp"], optional = true, version = "0.4" } +embassy-net = { default-features = false, features = ["tcp"], optional = true, version = "0.5" } embedded-io-async = { default-features = false, optional = true, version = "0.6" } -embedded-tls = { default-features = false, optional = true, git = "https://github.com/drogue-iot/embedded-tls" } +embedded-tls = { default-features = false, optional = true, version = "0.17" } fastrand = { default-features = false, optional = true, version = "2.0" } flate2 = { default-features = false, features = ["zlib-rs"], optional = true, version = "1.0" } foldhash = { default-features = false, optional = true, version = "0.1" } @@ -72,7 +72,7 @@ http-session = ["chrono/serde", "http-cookie-secure", "serde_json"] http2 = ["foldhash", "hashbrown", "http"] httparse = ["dep:httparse"] memchr = ["dep:memchr"] -nightly = ["hashbrown?/nightly"] +nightly = [] #FIXME(STABLE): "hashbrown?/nightly" optimization = ["memchr", "simdutf8"] pool = [] portable-atomic-util = ["portable-atomic", "dep:portable-atomic-util"] diff --git a/wtx/src/database.rs b/wtx/src/database.rs index 65b0279c..ef449647 100644 --- a/wtx/src/database.rs +++ b/wtx/src/database.rs @@ -11,7 +11,7 @@ mod from_records; mod json; mod misc; mod record; -mod record_values; +pub(crate) mod record_values; mod records; #[cfg(feature = "schema-manager")] pub mod schema_manager; @@ -30,7 +30,6 @@ pub use from_records::FromRecords; pub use json::Json; pub use misc::seek_related_entities; pub use record::Record; -pub(crate) use record_values::encode; pub use record_values::RecordValues; pub use records::Records; pub use stmt_cmd::StmtCmd; diff --git a/wtx/src/database/client/postgres.rs b/wtx/src/database/client/postgres.rs index f761d180..7828e6a0 100644 --- a/wtx/src/database/client/postgres.rs +++ b/wtx/src/database/client/postgres.rs @@ -57,7 +57,8 @@ where const TY: DatabaseTy = DatabaseTy::Postgres; type DecodeValue<'exec> = DecodeValue<'exec>; - type EncodeValue<'buffer, 'tmp> = EncodeValue<'buffer, 'tmp> + type EncodeValue<'buffer, 'tmp> + = EncodeValue<'buffer, 'tmp> where 'buffer: 'tmp; type Error = E; @@ -75,7 +76,7 @@ impl Default for Postgres { #[cfg(test)] mod tests { - use crate::database::client::postgres::{statements::Column, Ty}; + use crate::database::client::postgres::{statements::column::Column, Ty}; pub(crate) fn column0() -> Column { Column::new("a".try_into().unwrap(), Ty::VarcharArray) diff --git a/wtx/src/database/client/postgres/executor.rs b/wtx/src/database/client/postgres/executor.rs index 8b314c6e..73b5338d 100644 --- a/wtx/src/database/client/postgres/executor.rs +++ b/wtx/src/database/client/postgres/executor.rs @@ -119,7 +119,8 @@ where S: Stream, { type Database = Postgres; - type TransactionManager<'tm> = TransactionManager<'tm, E, EB, S> + type TransactionManager<'tm> + = TransactionManager<'tm, E, EB, S> where Self: 'tm; diff --git a/wtx/src/database/client/postgres/executor/authentication.rs b/wtx/src/database/client/postgres/executor/authentication.rs index 178c3f1e..dc8542ef 100644 --- a/wtx/src/database/client/postgres/executor/authentication.rs +++ b/wtx/src/database/client/postgres/executor/authentication.rs @@ -11,8 +11,8 @@ use crate::{ Identifier, }, misc::{ - bytes_split1, from_utf8_basic, ArrayVector, ConnectionState, FilledBufferWriter, LeaseMut, - PartitionedFilledBuffer, Rng, Stream, Vector, + bytes_split1, from_utf8_basic, partitioned_filled_buffer::PartitionedFilledBuffer, ArrayVector, + ConnectionState, FilledBufferWriter, LeaseMut, Rng, Stream, Vector, }, }; use base64::prelude::{Engine as _, BASE64_STANDARD}; diff --git a/wtx/src/database/client/postgres/executor/fetch.rs b/wtx/src/database/client/postgres/executor/fetch.rs index 0cf9bb2d..10cf8df4 100644 --- a/wtx/src/database/client/postgres/executor/fetch.rs +++ b/wtx/src/database/client/postgres/executor/fetch.rs @@ -3,14 +3,14 @@ use crate::{ client::postgres::{ executor::commons::FetchWithStmtCommons, message::{Message, MessageTy}, - statements::Statement, + statements::statement::Statement, Executor, ExecutorBuffer, Postgres, PostgresError, Record, }, RecordValues, }, misc::{ - ConnectionState, LeaseMut, PartitionedFilledBuffer, Stream, Usize, Vector, _read_header, - _read_payload, + partitioned_filled_buffer::PartitionedFilledBuffer, ConnectionState, LeaseMut, Stream, Usize, + Vector, _read_header, _read_payload, }, }; use core::ops::Range; diff --git a/wtx/src/database/client/postgres/executor/prepare.rs b/wtx/src/database/client/postgres/executor/prepare.rs index cf1fc7f1..5259af18 100644 --- a/wtx/src/database/client/postgres/executor/prepare.rs +++ b/wtx/src/database/client/postgres/executor/prepare.rs @@ -6,13 +6,16 @@ use crate::{ message::MessageTy, msg_field::MsgField, protocol::{bind, describe, execute, parse, sync}, - statements::{Column, Statement, StatementsMisc}, + statements::{column::Column, statement::Statement, statements_misc::StatementsMisc}, ty::Ty, Executor, Postgres, PostgresError, Statements, }, RecordValues, StmtCmd, }, - misc::{ArrayString, FilledBufferWriter, LeaseMut, PartitionedFilledBuffer, Stream}, + misc::{ + partitioned_filled_buffer::PartitionedFilledBuffer, ArrayString, FilledBufferWriter, LeaseMut, + Stream, + }, }; impl Executor diff --git a/wtx/src/database/client/postgres/executor_buffer.rs b/wtx/src/database/client/postgres/executor_buffer.rs index 2a4c654e..c24aca93 100644 --- a/wtx/src/database/client/postgres/executor_buffer.rs +++ b/wtx/src/database/client/postgres/executor_buffer.rs @@ -1,6 +1,6 @@ use crate::{ database::{client::postgres::Statements, Identifier}, - misc::{Lease, LeaseMut, PartitionedFilledBuffer, Rng, Vector}, + misc::{partitioned_filled_buffer::PartitionedFilledBuffer, Lease, LeaseMut, Rng, Vector}, }; use core::ops::Range; use hashbrown::HashMap; diff --git a/wtx/src/database/client/postgres/protocol.rs b/wtx/src/database/client/postgres/protocol.rs index b185a1f1..3225bb4c 100644 --- a/wtx/src/database/client/postgres/protocol.rs +++ b/wtx/src/database/client/postgres/protocol.rs @@ -1,6 +1,8 @@ use crate::{ database::{ - client::postgres::{statements::Statement, Config, EncodeValue, Oid, Postgres, PostgresError}, + client::postgres::{ + statements::statement::Statement, Config, EncodeValue, Oid, Postgres, PostgresError, + }, RecordValues, }, misc::{FilledBufferWriter, Vector}, diff --git a/wtx/src/database/client/postgres/record.rs b/wtx/src/database/client/postgres/record.rs index 9940bc49..4e89f61f 100644 --- a/wtx/src/database/client/postgres/record.rs +++ b/wtx/src/database/client/postgres/record.rs @@ -1,6 +1,6 @@ use crate::{ database::{ - client::postgres::{statements::Statement, DecodeValue, Postgres, PostgresError}, + client::postgres::{statements::statement::Statement, DecodeValue, Postgres, PostgresError}, Database, ValueIdent, }, misc::{Vector, _unlikely_dflt, _unlikely_elem}, @@ -176,7 +176,7 @@ mod tests { use crate::{ database::{ client::postgres::{ - statements::Statement, + statements::statement::Statement, tests::{column0, column1, column2}, DecodeValue, Record, Ty, }, diff --git a/wtx/src/database/client/postgres/records.rs b/wtx/src/database/client/postgres/records.rs index 107de3cd..65c92f15 100644 --- a/wtx/src/database/client/postgres/records.rs +++ b/wtx/src/database/client/postgres/records.rs @@ -1,4 +1,4 @@ -use crate::database::client::postgres::{statements::Statement, Postgres, Record}; +use crate::database::client::postgres::{statements::statement::Statement, Postgres, Record}; use core::{marker::PhantomData, ops::Range}; /// Records @@ -89,7 +89,7 @@ mod tests { use crate::{ database::{ client::postgres::{ - statements::Statement, + statements::statement::Statement, tests::{column0, column1, column2}, DecodeValue, Record, Records, Ty, }, diff --git a/wtx/src/database/client/postgres/statements.rs b/wtx/src/database/client/postgres/statements.rs index 03a404fe..dd21edb4 100644 --- a/wtx/src/database/client/postgres/statements.rs +++ b/wtx/src/database/client/postgres/statements.rs @@ -1,25 +1,21 @@ -mod column; -mod statement; -mod statement_builder; -mod statements_misc; +pub(crate) mod column; +pub(crate) mod statement; +pub(crate) mod statement_builder; +pub(crate) mod statements_misc; use crate::{ database::client::postgres::ty::Ty, misc::{BlocksDeque, Rng, _random_state}, }; -pub(crate) use column::Column; use foldhash::fast::FixedState; use hashbrown::HashMap; -pub(crate) use statement::Statement; -pub(crate) use statement_builder::StatementBuilder; -pub(crate) use statements_misc::StatementsMisc; /// Statements #[derive(Debug)] pub struct Statements { max_stmts: usize, rs: FixedState, - stmts: BlocksDeque<(Column, Ty), StatementsMisc>, + stmts: BlocksDeque<(column::Column, Ty), statements_misc::StatementsMisc>, stmts_indcs: HashMap, } @@ -56,7 +52,7 @@ impl Statements { } #[inline] - pub(crate) fn builder(&mut self) -> StatementBuilder<'_> { + pub(crate) fn builder(&mut self) -> statement_builder::StatementBuilder<'_> { if self.stmts.blocks_len() >= self.max_stmts { let to_remove = (self.max_stmts / 2).max(1); for _ in 0..to_remove { @@ -70,7 +66,7 @@ impl Statements { true }) } - StatementBuilder::new(&mut self.stmts, &mut self.stmts_indcs) + statement_builder::StatementBuilder::new(&mut self.stmts, &mut self.stmts_indcs) } #[inline] @@ -81,13 +77,13 @@ impl Statements { } #[inline] - pub(crate) fn get_by_idx(&self, idx: usize) -> Option> { + pub(crate) fn get_by_idx(&self, idx: usize) -> Option> { let stmt = self.stmts.get(idx)?; - Some(Statement::new(stmt.misc.columns_len, stmt.misc.types_len, stmt.data)) + Some(statement::Statement::new(stmt.misc.columns_len, stmt.misc.types_len, stmt.data)) } #[inline] - pub(crate) fn get_by_stmt_hash(&self, stmt_hash: u64) -> Option> { + pub(crate) fn get_by_stmt_hash(&self, stmt_hash: u64) -> Option> { self.get_by_idx(*self.stmts_indcs.get(&stmt_hash)?) } @@ -101,7 +97,7 @@ impl Statements { mod tests { use crate::{ database::client::postgres::{ - statements::StatementsMisc, + statements::statements_misc::StatementsMisc, tests::{column0, column1, column2, column3}, ty::Ty, Statements, diff --git a/wtx/src/database/client/postgres/statements/statement_builder.rs b/wtx/src/database/client/postgres/statements/statement_builder.rs index dc1c6b4a..feebccd1 100644 --- a/wtx/src/database/client/postgres/statements/statement_builder.rs +++ b/wtx/src/database/client/postgres/statements/statement_builder.rs @@ -1,7 +1,7 @@ use crate::{ database::{ client::postgres::{ - statements::{column::Column, StatementsMisc}, + statements::{column::Column, statements_misc::StatementsMisc}, Ty, }, Identifier, diff --git a/wtx/src/database/client/postgres/tys.rs b/wtx/src/database/client/postgres/tys.rs index 14d2170a..17065768 100644 --- a/wtx/src/database/client/postgres/tys.rs +++ b/wtx/src/database/client/postgres/tys.rs @@ -25,7 +25,7 @@ macro_rules! test { #[cfg(test)] #[test] fn $name() { - let vec = &mut crate::misc::FilledBuffer::_new(); + let vec = &mut crate::misc::filled_buffer::FilledBuffer::_new(); let mut fbw = crate::misc::FilledBufferWriter::new(0, vec); let mut ev = EncodeValue::new(&mut fbw); let instance: $ty = $instance; diff --git a/wtx/src/http/cookie.rs b/wtx/src/http/cookie.rs index 3a509b57..ffb7f5cb 100644 --- a/wtx/src/http/cookie.rs +++ b/wtx/src/http/cookie.rs @@ -1,12 +1,10 @@ -mod cookie_bytes; +pub(crate) mod cookie_bytes; mod cookie_error; -mod cookie_generic; +pub(crate) mod cookie_generic; mod same_site; -use crate::misc::{ArrayVector, Rng, Vector, _shift_copyable_chunks}; -pub(crate) use cookie_bytes::CookieBytes; +use crate::misc::{mem_transfer::_shift_copyable_chunks, ArrayVector, Rng, Vector}; pub use cookie_error::CookieError; -pub(crate) use cookie_generic::CookieGeneric; use core::str; pub use same_site::SameSite; diff --git a/wtx/src/http/req_res_data.rs b/wtx/src/http/req_res_data.rs index 501ad838..cdce5b5a 100644 --- a/wtx/src/http/req_res_data.rs +++ b/wtx/src/http/req_res_data.rs @@ -1,8 +1,10 @@ use crate::{ http::Headers, - misc::{Lease, LeaseMut, Uri, UriString, _EMPTY_URI_STRING}, + misc::{Lease, LeaseMut, Uri, UriString}, }; -use alloc::boxed::Box; +use alloc::{boxed::Box, string::String}; + +static EMPTY_URI_STRING: UriString = UriString::_empty(String::new()); /// Groups the elements of an HTTP request/response. pub trait ReqResData { @@ -78,7 +80,7 @@ impl ReqResData for &[u8] { #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -97,7 +99,7 @@ impl ReqResData for [u8; N] { #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -116,7 +118,7 @@ impl ReqResData for () { #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -138,7 +140,7 @@ where #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -160,7 +162,7 @@ where #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -179,7 +181,7 @@ impl ReqResData for Headers { #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -201,7 +203,7 @@ where #[inline] fn uri(&self) -> &UriString { - &_EMPTY_URI_STRING + &EMPTY_URI_STRING } } @@ -282,7 +284,7 @@ impl ReqResDataMut for Headers { #[inline] fn parts_mut(&mut self) -> (&mut Self::Body, &mut Headers, &UriString) { - (&mut [], self, &_EMPTY_URI_STRING) + (&mut [], self, &EMPTY_URI_STRING) } } @@ -295,6 +297,6 @@ where #[inline] fn parts_mut(&mut self) -> (&mut Self::Body, &mut Headers, &UriString) { - (&mut self.0, self.1.lease_mut(), &_EMPTY_URI_STRING) + (&mut self.0, self.1.lease_mut(), &EMPTY_URI_STRING) } } diff --git a/wtx/src/http/session/session_decoder.rs b/wtx/src/http/session/session_decoder.rs index 537a02a6..c121c775 100644 --- a/wtx/src/http/session/session_decoder.rs +++ b/wtx/src/http/session/session_decoder.rs @@ -1,6 +1,6 @@ use crate::{ http::{ - cookie::{decrypt, CookieBytes}, + cookie::{cookie_bytes::CookieBytes, decrypt}, server_framework::Middleware, KnownHeaderName, ReqResBuffer, Request, Response, SessionError, SessionManager, SessionManagerInner, SessionState, SessionStore, StatusCode, diff --git a/wtx/src/http/session/session_manager.rs b/wtx/src/http/session/session_manager.rs index 990ce179..cdb24969 100644 --- a/wtx/src/http/session/session_manager.rs +++ b/wtx/src/http/session/session_manager.rs @@ -1,6 +1,6 @@ use crate::{ http::{ - cookie::{encrypt, CookieGeneric}, + cookie::{cookie_generic::CookieGeneric, encrypt}, session::SessionKey, Header, KnownHeaderName, ReqResBuffer, ReqResDataMut, SessionManagerBuilder, SessionState, SessionStore, diff --git a/wtx/src/http/session/session_manager_builder.rs b/wtx/src/http/session/session_manager_builder.rs index bad46428..9d33410f 100644 --- a/wtx/src/http/session/session_manager_builder.rs +++ b/wtx/src/http/session/session_manager_builder.rs @@ -1,6 +1,6 @@ use crate::{ http::{ - cookie::{CookieGeneric, SameSite}, + cookie::{cookie_generic::CookieGeneric, SameSite}, session::{SessionKey, SessionManagerInner}, SessionManager, SessionStore, }, diff --git a/wtx/src/http2.rs b/wtx/src/http2.rs index 79980282..07d4f4b5 100644 --- a/wtx/src/http2.rs +++ b/wtx/src/http2.rs @@ -58,8 +58,8 @@ use crate::{ sorp_mut, write_array, }, misc::{ - Arc, AtomicWaker, ConnectionState, Either, LeaseMut, Lock, PartitionedFilledBuffer, RefCounter, - StreamReader, StreamWriter, Usize, NOOP_WAKER, + partitioned_filled_buffer::PartitionedFilledBuffer, Arc, AtomicWaker, ConnectionState, Either, + LeaseMut, Lock, RefCounter, StreamReader, StreamWriter, Usize, NOOP_WAKER, }, }; pub use client_stream::ClientStream; diff --git a/wtx/src/http2/client_stream.rs b/wtx/src/http2/client_stream.rs index 030d0527..31e1cf13 100644 --- a/wtx/src/http2/client_stream.rs +++ b/wtx/src/http2/client_stream.rs @@ -13,7 +13,7 @@ use crate::{ window::Windows, CommonStream, Http2Buffer, Http2Data, Http2RecvStatus, Http2SendStatus, }, - misc::{Arc, Lease, LeaseMut, Lock, RefCounter, StreamWriter, _Span}, + misc::{facades::span::_Span, Arc, Lease, LeaseMut, Lock, RefCounter, StreamWriter}, }; use core::{ future::{poll_fn, Future}, diff --git a/wtx/src/http2/common_stream.rs b/wtx/src/http2/common_stream.rs index 2e1e1c5f..8ea3c6ca 100644 --- a/wtx/src/http2/common_stream.rs +++ b/wtx/src/http2/common_stream.rs @@ -11,7 +11,7 @@ use crate::{ window::WindowsPair, Http2Buffer, Http2Data, Http2RecvStatus, Http2SendStatus, SendDataMode, }, - misc::{Arc, LeaseMut, Lock, RefCounter, StreamWriter, Vector, _Span}, + misc::{facades::span::_Span, Arc, LeaseMut, Lock, RefCounter, StreamWriter, Vector}, }; use core::{ future::{poll_fn, Future}, diff --git a/wtx/src/http2/frame_reader.rs b/wtx/src/http2/frame_reader.rs index 8e31c0fb..6f123a3e 100644 --- a/wtx/src/http2/frame_reader.rs +++ b/wtx/src/http2/frame_reader.rs @@ -30,8 +30,8 @@ use crate::{ Http2Buffer, Http2Data, Http2Error, }, misc::{ - Arc, AtomicWaker, LeaseMut, Lock, PartitionedFilledBuffer, RefCounter, StreamReader, - StreamWriter, + partitioned_filled_buffer::PartitionedFilledBuffer, Arc, AtomicWaker, LeaseMut, Lock, + RefCounter, StreamReader, StreamWriter, }, }; use core::{ diff --git a/wtx/src/http2/hpack_encoder.rs b/wtx/src/http2/hpack_encoder.rs index 0e2b9967..b076b974 100644 --- a/wtx/src/http2/hpack_encoder.rs +++ b/wtx/src/http2/hpack_encoder.rs @@ -14,7 +14,7 @@ use crate::{ hpack_header::HpackHeaderBasic, hpack_headers::HpackHeaders, huffman::huffman_encode, misc::protocol_err, Http2Error, }, - misc::{Rng, Usize, Vector, _random_state, _shift_copyable_chunks, _unreachable}, + misc::{Rng, Usize, Vector, _random_state, _unreachable, mem_transfer::_shift_copyable_chunks}, }; use core::{ hash::{BuildHasher, Hasher}, diff --git a/wtx/src/http2/http2_buffer.rs b/wtx/src/http2/http2_buffer.rs index d9f6c570..e8041a02 100644 --- a/wtx/src/http2/http2_buffer.rs +++ b/wtx/src/http2/http2_buffer.rs @@ -3,7 +3,10 @@ use crate::{ hpack_decoder::HpackDecoder, hpack_encoder::HpackEncoder, index_map::IndexMap, initial_server_header::InitialServerHeader, uri_buffer::UriBuffer, Scrp, Sorp, }, - misc::{simple_seed, Arc, AtomicWaker, Lease, LeaseMut, PartitionedFilledBuffer, Rng, Vector}, + misc::{ + partitioned_filled_buffer::PartitionedFilledBuffer, simple_seed, Arc, AtomicWaker, Lease, + LeaseMut, Rng, Vector, + }, }; use alloc::boxed::Box; use core::sync::atomic::{AtomicBool, Ordering}; diff --git a/wtx/src/http2/misc.rs b/wtx/src/http2/misc.rs index d17836c0..1164c71c 100644 --- a/wtx/src/http2/misc.rs +++ b/wtx/src/http2/misc.rs @@ -16,8 +16,8 @@ use crate::{ Http2SendStatus, Scrp, Sorp, }, misc::{ - AtomicWaker, LeaseMut, Lock, PartitionedFilledBuffer, RefCounter, StreamReader, StreamWriter, - Usize, _read_header, _read_payload, + partitioned_filled_buffer::PartitionedFilledBuffer, AtomicWaker, LeaseMut, Lock, RefCounter, + StreamReader, StreamWriter, Usize, _read_header, _read_payload, }, }; use core::{ diff --git a/wtx/src/http2/process_receipt_frame_ty.rs b/wtx/src/http2/process_receipt_frame_ty.rs index 57021256..46e6f2f1 100644 --- a/wtx/src/http2/process_receipt_frame_ty.rs +++ b/wtx/src/http2/process_receipt_frame_ty.rs @@ -19,7 +19,10 @@ use crate::{ window_update_frame::WindowUpdateFrame, Http2Error, Http2ErrorCode, Http2Params, Scrp, Sorp, }, - misc::{AtomicWaker, PartitionedFilledBuffer, StreamReader, StreamWriter, NOOP_WAKER}, + misc::{ + partitioned_filled_buffer::PartitionedFilledBuffer, AtomicWaker, StreamReader, StreamWriter, + NOOP_WAKER, + }, }; use core::{mem, sync::atomic::AtomicBool, task::Waker}; diff --git a/wtx/src/http2/server_stream.rs b/wtx/src/http2/server_stream.rs index 6ff1765a..aab60d81 100644 --- a/wtx/src/http2/server_stream.rs +++ b/wtx/src/http2/server_stream.rs @@ -8,7 +8,9 @@ use crate::{ u31::U31, CommonStream, Http2Buffer, Http2Data, Http2RecvStatus, Http2SendStatus, }, - misc::{Arc, Lease, LeaseMut, Lock, RefCounter, SingleTypeStorage, StreamWriter, _Span}, + misc::{ + facades::span::_Span, Arc, Lease, LeaseMut, Lock, RefCounter, SingleTypeStorage, StreamWriter, + }, }; use core::{ future::{poll_fn, Future}, diff --git a/wtx/src/macros.rs b/wtx/src/macros.rs index 81595243..6696e0c1 100644 --- a/wtx/src/macros.rs +++ b/wtx/src/macros.rs @@ -397,7 +397,7 @@ macro_rules! _trace { macro_rules! _trace_span { ($($tt:tt)+) => { - crate::misc::_Span::_new( + crate::misc::facades::span::_Span::_new( #[cfg(feature = "tracing")] tracing::trace_span!($($tt)+), #[cfg(not(feature = "tracing"))] diff --git a/wtx/src/misc.rs b/wtx/src/misc.rs index a6341fbb..74d2829b 100644 --- a/wtx/src/misc.rs +++ b/wtx/src/misc.rs @@ -10,8 +10,8 @@ mod connection_state; mod deque; mod either; mod enum_var_strings; -mod facades; -mod filled_buffer; +pub(crate) mod facades; +pub(crate) mod filled_buffer; mod filled_buffer_writer; mod fn_fut; mod from_radix_10; @@ -21,10 +21,10 @@ mod interspace; mod iter_wrapper; mod lease; mod lock; -mod mem_transfer; +pub(crate) mod mem_transfer; mod noop_waker; mod optimization; -mod partitioned_filled_buffer; +pub(crate) mod partitioned_filled_buffer; mod query_writer; mod ref_counter; mod rng; @@ -76,15 +76,6 @@ pub use uri::{Uri, UriArrayString, UriRef, UriString}; pub use usize::Usize; pub use utf8_errors::{BasicUtf8Error, ExtUtf8Error, StdUtf8Error}; pub use vector::{Vector, VectorError}; -#[allow(unused_imports, reason = "used in other features")] -pub(crate) use { - facades::span::{_Entered, _Span}, - facades::{atomic_u64::AtomicU64, atomic_usize::AtomicUsize}, - filled_buffer::FilledBuffer, - mem_transfer::_shift_copyable_chunks, - partitioned_filled_buffer::PartitionedFilledBuffer, - uri::_EMPTY_URI_STRING, -}; /// Hashes a password using the `argon2` algorithm. #[cfg(feature = "argon2")] @@ -295,7 +286,7 @@ where #[inline] pub(crate) async fn _read_payload( (header_len, payload_len): (usize, usize), - network_buffer: &mut PartitionedFilledBuffer, + network_buffer: &mut partitioned_filled_buffer::PartitionedFilledBuffer, read: &mut usize, stream: &mut SR, ) -> crate::Result<()> diff --git a/wtx/src/misc/filled_buffer.rs b/wtx/src/misc/filled_buffer.rs index 3a51f9e8..b4987eeb 100644 --- a/wtx/src/misc/filled_buffer.rs +++ b/wtx/src/misc/filled_buffer.rs @@ -205,7 +205,7 @@ mod kani { #[cfg(test)] mod tests { - use crate::misc::FilledBuffer; + use crate::misc::filled_buffer::FilledBuffer; #[test] fn extend_from_slices_with_increasing_cap() { diff --git a/wtx/src/misc/filled_buffer_writer.rs b/wtx/src/misc/filled_buffer_writer.rs index ee6debf8..40b21f4a 100644 --- a/wtx/src/misc/filled_buffer_writer.rs +++ b/wtx/src/misc/filled_buffer_writer.rs @@ -1,4 +1,4 @@ -use crate::misc::{BufferMode, FilledBuffer, Lease, LeaseMut, VectorError}; +use crate::misc::{filled_buffer::FilledBuffer, BufferMode, Lease, LeaseMut, VectorError}; /// Helper that manages the copy of initialized bytes. #[derive(Debug)] diff --git a/wtx/src/misc/lock.rs b/wtx/src/misc/lock.rs index cf466bc6..0b738722 100644 --- a/wtx/src/misc/lock.rs +++ b/wtx/src/misc/lock.rs @@ -23,7 +23,8 @@ impl Lock for Arc where T: Lock, { - type Guard<'guard> = T::Guard<'guard> + type Guard<'guard> + = T::Guard<'guard> where Self: 'guard; type Resource = T::Resource; @@ -43,7 +44,8 @@ impl Lock for Rc where T: Lock, { - type Guard<'guard> = T::Guard<'guard> + type Guard<'guard> + = T::Guard<'guard> where Self: 'guard; type Resource = T::Resource; @@ -80,7 +82,8 @@ impl SyncLock for Arc where T: SyncLock, { - type Guard<'guard> = T::Guard<'guard> + type Guard<'guard> + = T::Guard<'guard> where Self: 'guard; type Resource = T::Resource; @@ -100,7 +103,8 @@ impl SyncLock for Rc where T: SyncLock, { - type Guard<'guard> = T::Guard<'guard> + type Guard<'guard> + = T::Guard<'guard> where Self: 'guard; type Resource = T::Resource; @@ -122,7 +126,8 @@ mod std { use std::sync::{Mutex, MutexGuard, TryLockError}; impl SyncLock for Mutex { - type Guard<'guard> = MutexGuard<'guard, Self::Resource> + type Guard<'guard> + = MutexGuard<'guard, Self::Resource> where Self: 'guard; type Resource = T; @@ -152,7 +157,8 @@ mod tokio { use tokio::sync::{Mutex, MutexGuard}; impl Lock for Mutex { - type Guard<'guard> = MutexGuard<'guard, Self::Resource> + type Guard<'guard> + = MutexGuard<'guard, Self::Resource> where Self: 'guard; type Resource = T; diff --git a/wtx/src/misc/partitioned_filled_buffer.rs b/wtx/src/misc/partitioned_filled_buffer.rs index a466b1f0..107dc28e 100644 --- a/wtx/src/misc/partitioned_filled_buffer.rs +++ b/wtx/src/misc/partitioned_filled_buffer.rs @@ -1,4 +1,4 @@ -use crate::misc::{FilledBuffer, FilledBufferWriter, Lease, LeaseMut, VectorError}; +use crate::misc::{filled_buffer::FilledBuffer, FilledBufferWriter, Lease, LeaseMut, VectorError}; use core::ops::Range; // ``` diff --git a/wtx/src/misc/rng/seed.rs b/wtx/src/misc/rng/seed.rs index 2b9b16de..f6b080cc 100644 --- a/wtx/src/misc/rng/seed.rs +++ b/wtx/src/misc/rng/seed.rs @@ -1,4 +1,4 @@ -use crate::misc::{AtomicU64, Usize}; +use crate::misc::{facades::atomic_u64::AtomicU64, Usize}; use alloc::boxed::Box; use core::{panic::Location, ptr, sync::atomic::Ordering}; diff --git a/wtx/src/misc/rng/xorshift.rs b/wtx/src/misc/rng/xorshift.rs index 8cd5c285..9374492d 100644 --- a/wtx/src/misc/rng/xorshift.rs +++ b/wtx/src/misc/rng/xorshift.rs @@ -1,4 +1,4 @@ -use crate::misc::{AtomicU64, Lease, LeaseMut, Rng}; +use crate::misc::{facades::atomic_u64::AtomicU64, Lease, LeaseMut, Rng}; use core::sync::atomic::Ordering; /// Xorshift that deals with 64 bits numbers. diff --git a/wtx/src/misc/sync/atomic_waker.rs b/wtx/src/misc/sync/atomic_waker.rs index 38858c01..1e2a4818 100644 --- a/wtx/src/misc/sync/atomic_waker.rs +++ b/wtx/src/misc/sync/atomic_waker.rs @@ -1,4 +1,4 @@ -use crate::misc::AtomicUsize; +use crate::misc::facades::atomic_usize::AtomicUsize; use core::{ cell::UnsafeCell, fmt::{self, Debug}, diff --git a/wtx/src/misc/sync/seq_lock.rs b/wtx/src/misc/sync/seq_lock.rs index b03cbaed..50766d61 100644 --- a/wtx/src/misc/sync/seq_lock.rs +++ b/wtx/src/misc/sync/seq_lock.rs @@ -1,4 +1,4 @@ -use crate::misc::{AtomicUsize, Backoff}; +use crate::misc::{facades::atomic_usize::AtomicUsize, Backoff}; use core::{ mem, sync::atomic::{fence, Ordering}, diff --git a/wtx/src/misc/tuple_impls.rs b/wtx/src/misc/tuple_impls.rs index 0778f298..627ae8c4 100644 --- a/wtx/src/misc/tuple_impls.rs +++ b/wtx/src/misc/tuple_impls.rs @@ -4,7 +4,7 @@ macro_rules! impl_0_16 { ($( [$($T:ident($N:tt))*] )+) => { #[cfg(feature = "database")] mod database { - use crate::database::{Database, Encode, RecordValues, encode}; + use crate::database::{Database, Encode, RecordValues, record_values::encode}; $( impl RecordValues for ($( $T, )*) diff --git a/wtx/src/misc/uri.rs b/wtx/src/misc/uri.rs index 4e3ea48b..0a4c3368 100644 --- a/wtx/src/misc/uri.rs +++ b/wtx/src/misc/uri.rs @@ -5,8 +5,6 @@ use crate::misc::{ use alloc::string::String; use core::fmt::{Arguments, Debug, Display, Formatter, Write}; -pub(crate) static _EMPTY_URI_STRING: UriString = UriString::_empty(String::new()); - /// [Uri] with an owned array. pub type UriArrayString = Uri>; /// [Uri] with a string reference. diff --git a/wtx/src/pool.rs b/wtx/src/pool.rs index 23a0705c..c00383f8 100644 --- a/wtx/src/pool.rs +++ b/wtx/src/pool.rs @@ -47,7 +47,8 @@ impl Pool for &T where T: Pool, { - type GetElem<'this> = T::GetElem<'this> + type GetElem<'this> + = T::GetElem<'this> where Self: 'this; type ResourceManager = T::ResourceManager; diff --git a/wtx/src/web_socket/read_frame_info.rs b/wtx/src/web_socket/read_frame_info.rs index f5b6927e..72751841 100644 --- a/wtx/src/web_socket/read_frame_info.rs +++ b/wtx/src/web_socket/read_frame_info.rs @@ -1,5 +1,5 @@ use crate::{ - misc::{PartitionedFilledBuffer, StreamReader, _read_header}, + misc::{partitioned_filled_buffer::PartitionedFilledBuffer, StreamReader, _read_header}, web_socket::{ misc::{has_masked_frame, op_code}, OpCode, WebSocketError, FIN_MASK, MAX_CONTROL_PAYLOAD_LEN, PAYLOAD_MASK, RSV1_MASK, RSV2_MASK, diff --git a/wtx/src/web_socket/web_socket_buffer.rs b/wtx/src/web_socket/web_socket_buffer.rs index 0de9b383..08e480e4 100644 --- a/wtx/src/web_socket/web_socket_buffer.rs +++ b/wtx/src/web_socket/web_socket_buffer.rs @@ -1,4 +1,6 @@ -use crate::misc::{Lease, LeaseMut, PartitionedFilledBuffer, Vector, VectorError}; +use crate::misc::{ + partitioned_filled_buffer::PartitionedFilledBuffer, Lease, LeaseMut, Vector, VectorError, +}; #[derive(Debug)] #[doc = _internal_buffer_doc!()] diff --git a/wtx/src/web_socket/web_socket_parts/web_socket_part.rs b/wtx/src/web_socket/web_socket_parts/web_socket_part.rs index ca82779a..0bea5c46 100644 --- a/wtx/src/web_socket/web_socket_parts/web_socket_part.rs +++ b/wtx/src/web_socket/web_socket_parts/web_socket_part.rs @@ -1,7 +1,7 @@ use crate::{ misc::{ - ConnectionState, LeaseMut, Lock, PartitionedFilledBuffer, Stream, StreamReader, StreamWriter, - Vector, Xorshift64, + partitioned_filled_buffer::PartitionedFilledBuffer, ConnectionState, LeaseMut, Lock, Stream, + StreamReader, StreamWriter, Vector, Xorshift64, }, web_socket::{ compression::NegotiatedCompression, payload_ty::PayloadTy, diff --git a/wtx/src/web_socket/web_socket_parts/web_socket_part_mut.rs b/wtx/src/web_socket/web_socket_parts/web_socket_part_mut.rs index 0166cf7a..2fddac6b 100644 --- a/wtx/src/web_socket/web_socket_parts/web_socket_part_mut.rs +++ b/wtx/src/web_socket/web_socket_parts/web_socket_part_mut.rs @@ -1,5 +1,8 @@ use crate::{ - misc::{ConnectionState, LeaseMut, PartitionedFilledBuffer, Stream, Vector, Xorshift64}, + misc::{ + partitioned_filled_buffer::PartitionedFilledBuffer, ConnectionState, LeaseMut, Stream, Vector, + Xorshift64, + }, web_socket::{ compression::NegotiatedCompression, payload_ty::PayloadTy, diff --git a/wtx/src/web_socket/web_socket_parts/web_socket_part_owned.rs b/wtx/src/web_socket/web_socket_parts/web_socket_part_owned.rs index 11095d72..4672d469 100644 --- a/wtx/src/web_socket/web_socket_parts/web_socket_part_owned.rs +++ b/wtx/src/web_socket/web_socket_parts/web_socket_part_owned.rs @@ -1,7 +1,7 @@ use crate::{ misc::{ - ConnectionState, LeaseMut, Lock, PartitionedFilledBuffer, StreamReader, StreamWriter, Vector, - Xorshift64, + partitioned_filled_buffer::PartitionedFilledBuffer, ConnectionState, LeaseMut, Lock, + StreamReader, StreamWriter, Vector, Xorshift64, }, web_socket::{ compression::NegotiatedCompression, diff --git a/wtx/src/web_socket/web_socket_reader.rs b/wtx/src/web_socket/web_socket_reader.rs index b8bc707f..cbea1fa7 100644 --- a/wtx/src/web_socket/web_socket_reader.rs +++ b/wtx/src/web_socket/web_socket_reader.rs @@ -7,9 +7,9 @@ use crate::{ misc::{ - from_utf8_basic, from_utf8_ext, BufferMode, CompletionErr, ConnectionState, ExtUtf8Error, - FnMutFut, IncompleteUtf8Char, LeaseMut, PartitionedFilledBuffer, Rng, StreamReader, - StreamWriter, Vector, _read_payload, + from_utf8_basic, from_utf8_ext, partitioned_filled_buffer::PartitionedFilledBuffer, BufferMode, + CompletionErr, ConnectionState, ExtUtf8Error, FnMutFut, IncompleteUtf8Char, LeaseMut, Rng, + StreamReader, StreamWriter, Vector, _read_payload, }, web_socket::{ compression::NegotiatedCompression, fill_with_close_code, read_frame_info::ReadFrameInfo,