From f3235613e2b9e5db5094b1fb548f5b380f2eb284 Mon Sep 17 00:00:00 2001 From: plebhash Date: Thu, 5 Dec 2024 17:24:15 +0700 Subject: [PATCH 1/2] enforce missing_docs macro on every `.rs` file that still didn't have it --- benches/benches/src/sv1/criterion_sv1_benchmark.rs | 1 + benches/benches/src/sv1/iai_sv1_benchmark.rs | 1 + benches/benches/src/sv1/lib/client.rs | 1 + benches/benches/src/sv2/criterion_sv2_benchmark.rs | 1 + benches/benches/src/sv2/iai_sv2_benchmark.rs | 1 + benches/benches/src/sv2/lib/client.rs | 1 + common/src/lib.rs | 1 + examples/interop-cpp/src/main.rs | 1 + .../example-of-guix-build/quickcheck/src/lib.rs | 1 + .../example-of-guix-build/quickcheck_macros/src/lib.rs | 1 + examples/ping-pong-with-noise/src/main.rs | 1 + examples/ping-pong-with-noise/src/messages.rs | 1 + examples/ping-pong-with-noise/src/node.rs | 1 + examples/ping-pong-without-noise/src/main.rs | 1 + examples/ping-pong-without-noise/src/messages.rs | 1 + examples/ping-pong-without-noise/src/node.rs | 1 + examples/sv1-client-and-server/src/main.rs | 1 + examples/template-provider-test/src/main.rs | 1 + protocols/fuzz-tests/src/main.rs | 1 + protocols/v1/src/error.rs | 1 + protocols/v1/src/json_rpc.rs | 1 + protocols/v1/src/lib.rs | 1 + protocols/v1/src/methods/client_to_server.rs | 1 + protocols/v1/src/methods/mod.rs | 1 + protocols/v1/src/methods/server_to_client.rs | 1 + protocols/v1/src/utils.rs | 1 + protocols/v2/binary-sv2/binary-sv2/src/lib.rs | 1 + .../v2/binary-sv2/no-serde-sv2/codec/src/codec/decodable.rs | 1 + .../v2/binary-sv2/no-serde-sv2/codec/src/codec/encodable.rs | 1 + protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/impls.rs | 1 + protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/mod.rs | 1 + .../no-serde-sv2/codec/src/datatypes/copy_data_types.rs | 1 + protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/mod.rs | 1 + .../codec/src/datatypes/non_copy_data_types/inner.rs | 1 + .../no-serde-sv2/codec/src/datatypes/non_copy_data_types/mod.rs | 1 + .../codec/src/datatypes/non_copy_data_types/seq_inner.rs | 1 + protocols/v2/binary-sv2/no-serde-sv2/codec/src/lib.rs | 1 + protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/de.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/error.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/lib.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b016m.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b0255.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b032.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b064k.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/bytes.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/mod.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/primitives/mod.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/sequences/mod.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/sequences/option.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs | 1 + .../v2/binary-sv2/serde-sv2/src/primitives/sequences/seq064k.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/primitives/short_tx_id.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/primitives/signature.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/primitives/u24.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/primitives/u256.rs | 1 + protocols/v2/binary-sv2/serde-sv2/src/ser.rs | 1 + protocols/v2/codec-sv2/examples/encrypted.rs | 1 + protocols/v2/codec-sv2/examples/unencrypted.rs | 1 + protocols/v2/codec-sv2/src/decoder.rs | 1 + protocols/v2/codec-sv2/src/encoder.rs | 1 + protocols/v2/codec-sv2/src/error.rs | 1 + protocols/v2/codec-sv2/src/lib.rs | 1 + protocols/v2/const-sv2/src/lib.rs | 1 + protocols/v2/framing-sv2/src/error.rs | 1 + protocols/v2/framing-sv2/src/framing.rs | 1 + protocols/v2/framing-sv2/src/header.rs | 1 + protocols/v2/framing-sv2/src/lib.rs | 1 + protocols/v2/noise-sv2/examples/handshake.rs | 1 + protocols/v2/noise-sv2/src/aed_cipher.rs | 1 + protocols/v2/noise-sv2/src/cipher_state.rs | 1 + protocols/v2/noise-sv2/src/error.rs | 1 + protocols/v2/noise-sv2/src/handshake.rs | 1 + protocols/v2/noise-sv2/src/initiator.rs | 1 + protocols/v2/noise-sv2/src/lib.rs | 1 + protocols/v2/noise-sv2/src/responder.rs | 1 + protocols/v2/noise-sv2/src/signature_message.rs | 1 + protocols/v2/noise-sv2/src/test.rs | 1 + .../v2/roles-logic-sv2/src/channel_logic/channel_factory.rs | 1 + protocols/v2/roles-logic-sv2/src/channel_logic/mod.rs | 1 + .../v2/roles-logic-sv2/src/channel_logic/proxy_group_channel.rs | 1 + protocols/v2/roles-logic-sv2/src/common_properties.rs | 1 + protocols/v2/roles-logic-sv2/src/errors.rs | 1 + protocols/v2/roles-logic-sv2/src/handlers/common.rs | 1 + protocols/v2/roles-logic-sv2/src/handlers/job_declaration.rs | 1 + protocols/v2/roles-logic-sv2/src/handlers/mining.rs | 1 + protocols/v2/roles-logic-sv2/src/handlers/mod.rs | 1 + .../v2/roles-logic-sv2/src/handlers/template_distribution.rs | 1 + protocols/v2/roles-logic-sv2/src/job_creator.rs | 1 + protocols/v2/roles-logic-sv2/src/job_dispatcher.rs | 1 + protocols/v2/roles-logic-sv2/src/lib.rs | 1 + protocols/v2/roles-logic-sv2/src/parsers.rs | 1 + protocols/v2/roles-logic-sv2/src/routing_logic.rs | 1 + protocols/v2/roles-logic-sv2/src/selectors.rs | 1 + protocols/v2/roles-logic-sv2/src/utils.rs | 1 + .../subprotocols/common-messages/src/channel_endpoint_changed.rs | 1 + protocols/v2/subprotocols/common-messages/src/lib.rs | 1 + .../v2/subprotocols/common-messages/src/setup_connection.rs | 1 + .../job-declaration/src/allocate_mining_job_token.rs | 1 + .../v2/subprotocols/job-declaration/src/declare_mining_job.rs | 1 + .../v2/subprotocols/job-declaration/src/identify_transactions.rs | 1 + protocols/v2/subprotocols/job-declaration/src/lib.rs | 1 + .../job-declaration/src/provide_missing_transactions.rs | 1 + protocols/v2/subprotocols/job-declaration/src/submit_solution.rs | 1 + protocols/v2/subprotocols/mining/src/close_channel.rs | 1 + protocols/v2/subprotocols/mining/src/lib.rs | 1 + protocols/v2/subprotocols/mining/src/new_mining_job.rs | 1 + protocols/v2/subprotocols/mining/src/open_channel.rs | 1 + protocols/v2/subprotocols/mining/src/reconnect.rs | 1 + protocols/v2/subprotocols/mining/src/set_custom_mining_job.rs | 1 + protocols/v2/subprotocols/mining/src/set_extranonce_prefix.rs | 1 + protocols/v2/subprotocols/mining/src/set_group_channel.rs | 1 + protocols/v2/subprotocols/mining/src/set_new_prev_hash.rs | 1 + protocols/v2/subprotocols/mining/src/set_target.rs | 1 + protocols/v2/subprotocols/mining/src/submit_shares.rs | 1 + protocols/v2/subprotocols/mining/src/update_channel.rs | 1 + .../template-distribution/src/coinbase_output_data_size.rs | 1 + protocols/v2/subprotocols/template-distribution/src/lib.rs | 1 + .../v2/subprotocols/template-distribution/src/new_template.rs | 1 + .../template-distribution/src/request_transaction_data.rs | 1 + .../subprotocols/template-distribution/src/set_new_prev_hash.rs | 1 + .../v2/subprotocols/template-distribution/src/submit_solution.rs | 1 + protocols/v2/sv2-ffi/src/lib.rs | 1 + roles/jd-client/src/args.rs | 1 + roles/jd-client/src/lib/downstream.rs | 1 + roles/jd-client/src/lib/error.rs | 1 + roles/jd-client/src/lib/job_declarator/message_handler.rs | 1 + roles/jd-client/src/lib/job_declarator/mod.rs | 1 + roles/jd-client/src/lib/job_declarator/setup_connection.rs | 1 + roles/jd-client/src/lib/mod.rs | 1 + roles/jd-client/src/lib/proxy_config.rs | 1 + roles/jd-client/src/lib/status.rs | 1 + roles/jd-client/src/lib/template_receiver/message_handler.rs | 1 + roles/jd-client/src/lib/template_receiver/mod.rs | 1 + roles/jd-client/src/lib/template_receiver/setup_connection.rs | 1 + roles/jd-client/src/lib/upstream_sv2/mod.rs | 1 + roles/jd-client/src/lib/upstream_sv2/upstream.rs | 1 + roles/jd-client/src/main.rs | 1 + roles/jd-server/src/lib/error.rs | 1 + roles/jd-server/src/lib/job_declarator/message_handler.rs | 1 + roles/jd-server/src/lib/job_declarator/mod.rs | 1 + roles/jd-server/src/lib/mempool/error.rs | 1 + roles/jd-server/src/lib/mempool/mod.rs | 1 + roles/jd-server/src/lib/mod.rs | 1 + roles/jd-server/src/lib/status.rs | 1 + roles/jd-server/src/main.rs | 1 + roles/mining-proxy/src/lib/downstream_mining.rs | 1 + roles/mining-proxy/src/lib/error.rs | 1 + roles/mining-proxy/src/lib/mod.rs | 1 + roles/mining-proxy/src/lib/upstream_mining.rs | 1 + roles/mining-proxy/src/main.rs | 1 + roles/pool/src/lib/error.rs | 1 + roles/pool/src/lib/mining_pool/message_handler.rs | 1 + roles/pool/src/lib/mining_pool/mod.rs | 1 + roles/pool/src/lib/mining_pool/setup_connection.rs | 1 + roles/pool/src/lib/mod.rs | 1 + roles/pool/src/lib/status.rs | 1 + roles/pool/src/lib/template_receiver/message_handler.rs | 1 + roles/pool/src/lib/template_receiver/mod.rs | 1 + roles/pool/src/lib/template_receiver/setup_connection.rs | 1 + roles/pool/src/main.rs | 1 + roles/roles-utils/network-helpers/src/lib.rs | 1 + .../network-helpers/src/noise_connection_async_std.rs | 1 + roles/roles-utils/network-helpers/src/noise_connection_tokio.rs | 1 + .../network-helpers/src/plain_connection_async_std.rs | 1 + roles/roles-utils/network-helpers/src/plain_connection_tokio.rs | 1 + roles/roles-utils/rpc/src/lib.rs | 1 + roles/roles-utils/rpc/src/mini_rpc_client.rs | 1 + roles/test-utils/mining-device-sv1/src/client.rs | 1 + roles/test-utils/mining-device-sv1/src/job.rs | 1 + roles/test-utils/mining-device-sv1/src/lib.rs | 1 + roles/test-utils/mining-device-sv1/src/main.rs | 1 + roles/test-utils/mining-device-sv1/src/miner.rs | 1 + roles/test-utils/mining-device/src/lib/mod.rs | 1 + roles/test-utils/mining-device/src/main.rs | 1 + roles/tests-integration/tests/common/mod.rs | 1 + roles/tests-integration/tests/common/sniffer.rs | 1 + roles/tests-integration/tests/pool_integration.rs | 1 + roles/translator/src/args.rs | 1 + roles/translator/src/lib/downstream_sv1/diff_management.rs | 1 + roles/translator/src/lib/downstream_sv1/downstream.rs | 1 + roles/translator/src/lib/downstream_sv1/mod.rs | 1 + roles/translator/src/lib/error.rs | 1 + roles/translator/src/lib/mod.rs | 1 + roles/translator/src/lib/proxy/bridge.rs | 1 + roles/translator/src/lib/proxy/mod.rs | 1 + roles/translator/src/lib/proxy/next_mining_notify.rs | 1 + roles/translator/src/lib/proxy_config.rs | 1 + roles/translator/src/lib/status.rs | 1 + roles/translator/src/lib/upstream_sv2/diff_management.rs | 1 + roles/translator/src/lib/upstream_sv2/mod.rs | 1 + roles/translator/src/lib/upstream_sv2/upstream.rs | 1 + roles/translator/src/lib/upstream_sv2/upstream_connection.rs | 1 + roles/translator/src/lib/utils.rs | 1 + roles/translator/src/main.rs | 1 + test/scale/src/main.rs | 1 + utils/bip32-key-derivation/src/lib.rs | 1 + utils/bip32-key-derivation/src/main.rs | 1 + utils/buffer/benches/control_struct.rs | 1 + utils/buffer/benches/pool_benchmark.rs | 1 + utils/buffer/benches/pool_iai.rs | 1 + utils/buffer/fuzz/fuzz_targets/faster.rs | 1 + utils/buffer/fuzz/fuzz_targets/slower.rs | 1 + utils/buffer/src/buffer.rs | 1 + utils/buffer/src/buffer_pool/mod.rs | 1 + utils/buffer/src/buffer_pool/pool_back.rs | 1 + utils/buffer/src/lib.rs | 1 + utils/buffer/src/slice.rs | 1 + utils/buffer/src/test.rs | 1 + utils/error-handling/src/lib.rs | 1 + utils/key-utils/src/lib.rs | 1 + utils/key-utils/src/main.rs | 1 + utils/message-generator/src/executor.rs | 1 + utils/message-generator/src/executor_sv1.rs | 1 + utils/message-generator/src/external_commands.rs | 1 + utils/message-generator/src/into_static.rs | 1 + utils/message-generator/src/main.rs | 1 + utils/message-generator/src/net.rs | 1 + utils/message-generator/src/parser/actions.rs | 1 + utils/message-generator/src/parser/frames.rs | 1 + utils/message-generator/src/parser/mod.rs | 1 + utils/message-generator/src/parser/sv1_messages.rs | 1 + utils/message-generator/src/parser/sv2_messages.rs | 1 + 223 files changed, 223 insertions(+) diff --git a/benches/benches/src/sv1/criterion_sv1_benchmark.rs b/benches/benches/src/sv1/criterion_sv1_benchmark.rs index ecf3fe890e..f7a210fcc1 100644 --- a/benches/benches/src/sv1/criterion_sv1_benchmark.rs +++ b/benches/benches/src/sv1/criterion_sv1_benchmark.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! This code uses `criterion` crate to benchmark the performance sv1. //! It measures connection time, send subscription latency and share submission time. diff --git a/benches/benches/src/sv1/iai_sv1_benchmark.rs b/benches/benches/src/sv1/iai_sv1_benchmark.rs index ddf28d3478..84615edb92 100644 --- a/benches/benches/src/sv1/iai_sv1_benchmark.rs +++ b/benches/benches/src/sv1/iai_sv1_benchmark.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The code uses iai library to measure the system requirements of sv1 client. use iai::{black_box, main}; diff --git a/benches/benches/src/sv1/lib/client.rs b/benches/benches/src/sv1/lib/client.rs index 3ef5fc38ef..0bbc6b7816 100644 --- a/benches/benches/src/sv1/lib/client.rs +++ b/benches/benches/src/sv1/lib/client.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The defines a sv1 `Client` struct that handles message exchange with the server. //! It includes methods for initializing the client, parsing messages, and sending various types of //! messages. It also provides a trait implementation for handling server messages and managing diff --git a/benches/benches/src/sv2/criterion_sv2_benchmark.rs b/benches/benches/src/sv2/criterion_sv2_benchmark.rs index df54f39426..0a0248abad 100644 --- a/benches/benches/src/sv2/criterion_sv2_benchmark.rs +++ b/benches/benches/src/sv2/criterion_sv2_benchmark.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use codec_sv2::{StandardEitherFrame, StandardSv2Frame}; use criterion::{black_box, Criterion}; use roles_logic_sv2::{ diff --git a/benches/benches/src/sv2/iai_sv2_benchmark.rs b/benches/benches/src/sv2/iai_sv2_benchmark.rs index b049b9dc42..3e65dc34bf 100644 --- a/benches/benches/src/sv2/iai_sv2_benchmark.rs +++ b/benches/benches/src/sv2/iai_sv2_benchmark.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use codec_sv2::{StandardEitherFrame, StandardSv2Frame}; use iai::{black_box, main}; use roles_logic_sv2::{ diff --git a/benches/benches/src/sv2/lib/client.rs b/benches/benches/src/sv2/lib/client.rs index 9ea76e0ece..3fea866494 100644 --- a/benches/benches/src/sv2/lib/client.rs +++ b/benches/benches/src/sv2/lib/client.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use bitcoin::{ blockdata::block::BlockHeader, hash_types::BlockHash, hashes::Hash, util::uint::Uint256, }; diff --git a/common/src/lib.rs b/common/src/lib.rs index 242c7acb35..f0f6faff50 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! # Stratum Common Crate //! //! `stratum_common` is a utility crate designed to centralize diff --git a/examples/interop-cpp/src/main.rs b/examples/interop-cpp/src/main.rs index 09950e94b0..237aa94001 100644 --- a/examples/interop-cpp/src/main.rs +++ b/examples/interop-cpp/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] fn main() -> Result<(), std::io::Error> { use main_::main; main() diff --git a/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck/src/lib.rs b/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck/src/lib.rs index 31e1bb209f..f4d2b59931 100644 --- a/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck/src/lib.rs +++ b/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(test)] mod tests { #[test] diff --git a/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck_macros/src/lib.rs b/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck_macros/src/lib.rs index 31e1bb209f..f4d2b59931 100644 --- a/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck_macros/src/lib.rs +++ b/examples/interop-cpp/template-provider/example-of-guix-build/quickcheck_macros/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(test)] mod tests { #[test] diff --git a/examples/ping-pong-with-noise/src/main.rs b/examples/ping-pong-with-noise/src/main.rs index 07d387238f..f3c177aa07 100644 --- a/examples/ping-pong-with-noise/src/main.rs +++ b/examples/ping-pong-with-noise/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] mod messages; mod node; use async_std::{ diff --git a/examples/ping-pong-with-noise/src/messages.rs b/examples/ping-pong-with-noise/src/messages.rs index 8997ae8b75..7b278c95cd 100644 --- a/examples/ping-pong-with-noise/src/messages.rs +++ b/examples/ping-pong-with-noise/src/messages.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use binary_sv2::{binary_codec_sv2, decodable::DecodableField, decodable::FieldMarker}; use binary_sv2::{Deserialize, GetSize, Seq064K, Serialize, Str0255, U24, U256}; diff --git a/examples/ping-pong-with-noise/src/node.rs b/examples/ping-pong-with-noise/src/node.rs index 1ae042aa83..46e50dd068 100644 --- a/examples/ping-pong-with-noise/src/node.rs +++ b/examples/ping-pong-with-noise/src/node.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::messages::{Message, Ping, Pong}; use binary_sv2::{from_bytes, GetSize, U256}; use rand::Rng; diff --git a/examples/ping-pong-without-noise/src/main.rs b/examples/ping-pong-without-noise/src/main.rs index e5bdb71efe..e84fa65f1f 100644 --- a/examples/ping-pong-without-noise/src/main.rs +++ b/examples/ping-pong-without-noise/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] mod messages; mod node; use async_std::{ diff --git a/examples/ping-pong-without-noise/src/messages.rs b/examples/ping-pong-without-noise/src/messages.rs index 8997ae8b75..7b278c95cd 100644 --- a/examples/ping-pong-without-noise/src/messages.rs +++ b/examples/ping-pong-without-noise/src/messages.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use binary_sv2::{binary_codec_sv2, decodable::DecodableField, decodable::FieldMarker}; use binary_sv2::{Deserialize, GetSize, Seq064K, Serialize, Str0255, U24, U256}; diff --git a/examples/ping-pong-without-noise/src/node.rs b/examples/ping-pong-without-noise/src/node.rs index 21edf617e1..49b09828e4 100644 --- a/examples/ping-pong-without-noise/src/node.rs +++ b/examples/ping-pong-without-noise/src/node.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::messages::{Message, Ping, Pong}; use binary_sv2::{from_bytes, U256}; use rand::Rng; diff --git a/examples/sv1-client-and-server/src/main.rs b/examples/sv1-client-and-server/src/main.rs index 01ae1e82a1..2bf98e12a2 100644 --- a/examples/sv1-client-and-server/src/main.rs +++ b/examples/sv1-client-and-server/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_std::net::{TcpListener, TcpStream}; use std::convert::{TryFrom, TryInto}; diff --git a/examples/template-provider-test/src/main.rs b/examples/template-provider-test/src/main.rs index 5a83aa39a7..971a15c94c 100644 --- a/examples/template-provider-test/src/main.rs +++ b/examples/template-provider-test/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{Receiver, Sender}; use async_std::net::TcpStream; use codec_sv2::{StandardEitherFrame, StandardSv2Frame, Sv2Frame}; diff --git a/protocols/fuzz-tests/src/main.rs b/protocols/fuzz-tests/src/main.rs index bb2364c0fd..c6e89320e6 100644 --- a/protocols/fuzz-tests/src/main.rs +++ b/protocols/fuzz-tests/src/main.rs @@ -1,4 +1,5 @@ #![no_main] +#![deny(missing_docs)] use libfuzzer_sys::fuzz_target; use binary_codec_sv2::{Seq064K,U256,B0255,Seq0255}; use binary_codec_sv2::from_bytes; diff --git a/protocols/v1/src/error.rs b/protocols/v1/src/error.rs index 9408a785e7..343b61e7ab 100644 --- a/protocols/v1/src/error.rs +++ b/protocols/v1/src/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ methods::{Method, MethodError}, utils::HexU32Be, diff --git a/protocols/v1/src/json_rpc.rs b/protocols/v1/src/json_rpc.rs index eaf7e717db..3d53e7e4fb 100644 --- a/protocols/v1/src/json_rpc.rs +++ b/protocols/v1/src/json_rpc.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! https://www.jsonrpc.org/specification#response_object use serde::{Deserialize, Serialize}; diff --git a/protocols/v1/src/lib.rs b/protocols/v1/src/lib.rs index 3d7268b234..33df4cbab2 100644 --- a/protocols/v1/src/lib.rs +++ b/protocols/v1/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::result_unit_err)] +#![deny(missing_docs)] //! Startum V1 application protocol: //! //! json-rpc has two types of messages: **request** and **response**. diff --git a/protocols/v1/src/methods/client_to_server.rs b/protocols/v1/src/methods/client_to_server.rs index 0e3693f359..76930e188e 100644 --- a/protocols/v1/src/methods/client_to_server.rs +++ b/protocols/v1/src/methods/client_to_server.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use bitcoin_hashes::hex::ToHex; use serde_json::{ Value, diff --git a/protocols/v1/src/methods/mod.rs b/protocols/v1/src/methods/mod.rs index b7bde1d4ec..db522e934e 100644 --- a/protocols/v1/src/methods/mod.rs +++ b/protocols/v1/src/methods/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::error::Error; use bitcoin_hashes::Error as BTCHashError; use hex::FromHexError; diff --git a/protocols/v1/src/methods/server_to_client.rs b/protocols/v1/src/methods/server_to_client.rs index 4fd32bdadf..5b37bc0606 100644 --- a/protocols/v1/src/methods/server_to_client.rs +++ b/protocols/v1/src/methods/server_to_client.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use serde_json::{ Value, Value::{Array as JArrary, Bool as JBool, Number as JNumber, String as JString}, diff --git a/protocols/v1/src/utils.rs b/protocols/v1/src/utils.rs index a3c02a48c7..fb37600f52 100644 --- a/protocols/v1/src/utils.rs +++ b/protocols/v1/src/utils.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::error::{self, Error}; use binary_sv2::{B032, U256}; use bitcoin_hashes::hex::{FromHex, ToHex}; diff --git a/protocols/v2/binary-sv2/binary-sv2/src/lib.rs b/protocols/v2/binary-sv2/binary-sv2/src/lib.rs index 85fc6b31b5..2a7c583662 100644 --- a/protocols/v2/binary-sv2/binary-sv2/src/lib.rs +++ b/protocols/v2/binary-sv2/binary-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // TODO unify errors from serde_sv2 and no-serde-sv2 #![no_std] diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/decodable.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/decodable.rs index 1ec7037f7a..78c7dc8c61 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/decodable.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/decodable.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ codec::{GetSize, SizeHint}, datatypes::{ diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/encodable.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/encodable.rs index 70be94ecbd..c21ab5a073 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/encodable.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/encodable.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ codec::GetSize, datatypes::{ diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/impls.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/impls.rs index ec2b4a1334..0a1f20edb9 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/impls.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/impls.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ codec::{ decodable::{ diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/mod.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/mod.rs index a26ae8e72f..55dfdba7e1 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/mod.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/codec/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // At lower level I generally prefer to work with slices as more efficient than Read/Write streams // eg: Read for & [u8] is implemented with memcpy but here is more than enough to just get a // pointer to the original data diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/copy_data_types.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/copy_data_types.rs index 690f719fd9..9ce73f2a73 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/copy_data_types.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/copy_data_types.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Copy data types use crate::{codec::Fixed, datatypes::Sv2DataType, Error}; diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/mod.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/mod.rs index 8ab1bc9249..073b422156 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/mod.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ codec::{GetSize, SizeHint}, Error, diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/inner.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/inner.rs index e0f30bf38a..2ad6fb7db7 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/inner.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/inner.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::IntoOwned; use crate::{ codec::{GetSize, SizeHint}, diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/mod.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/mod.rs index 40c47a7ba4..928375b450 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/mod.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(feature = "prop_test")] use quickcheck::{Arbitrary, Gen}; diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/seq_inner.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/seq_inner.rs index 9da799ba92..9ffec64c19 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/seq_inner.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/datatypes/non_copy_data_types/seq_inner.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ codec::{ decodable::{Decodable, DecodableField, FieldMarker, GetMarker, PrimitiveMarker}, diff --git a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/lib.rs b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/lib.rs index cbca39977d..ef66c95e7d 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/codec/src/lib.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/codec/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! ```txt //! SERDE <-> Sv2 //! bool <-> BOOL diff --git a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs index 1cd3176f38..16cb85d142 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![deny(missing_docs)] extern crate alloc; extern crate proc_macro; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/de.rs b/protocols/v2/binary-sv2/serde-sv2/src/de.rs index 6cfe7258ca..26ff5f0ebf 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/de.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/de.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Serde deserializer for [stratum v2][Sv2] implemented following [serde tutorial][tutorial] //! //! [Sv2]: https://docs.google.com/document/d/1FadCWj-57dvhxsnFM_7X806qyvhR0u3i85607bGHxvg/edit diff --git a/protocols/v2/binary-sv2/serde-sv2/src/error.rs b/protocols/v2/binary-sv2/serde-sv2/src/error.rs index 62da3c26db..2299c8588c 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/error.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use alloc::string::String; use core::fmt::{self, Display}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/lib.rs b/protocols/v2/binary-sv2/serde-sv2/src/lib.rs index 8fd26b92fc..0a2882e9bc 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/lib.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Serde serializer/deserializer for [stratum v2][Sv2] implemented following [serde //! tutorial][tutorial] //! diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b016m.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b016m.rs index f31200e75a..19001ad3c0 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b016m.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b016m.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::GetSize}; use alloc::vec::Vec; use core::convert::{TryFrom, TryInto}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b0255.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b0255.rs index 5b57750ebf..2a09bdb54b 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b0255.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b0255.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::GetSize}; use alloc::{string::ToString, vec::Vec}; use core::convert::{TryFrom, TryInto}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b032.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b032.rs index 09bd72de27..cd10a39d27 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b032.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b032.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::GetSize}; use alloc::vec::Vec; use core::convert::{TryFrom, TryInto}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b064k.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b064k.rs index 04515eacd2..735c7b359b 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b064k.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/b064k.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::GetSize}; use alloc::vec::Vec; use core::convert::{TryFrom, TryInto}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/bytes.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/bytes.rs index b9f34ba83e..5ac7642d39 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/bytes.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/bytes.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::primitives::GetSize; use alloc::vec::Vec; use serde::{de::Visitor, ser, Deserialize, Deserializer, Serialize}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/mod.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/mod.rs index e69cff8b35..17e7deafd7 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/mod.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/byte_arrays/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod b016m; pub mod b0255; pub mod b032; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/mod.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/mod.rs index e31462f607..3bd304369e 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/mod.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use alloc::{string::String, vec::Vec}; mod byte_arrays; pub mod sequences; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/mod.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/mod.rs index cfcf1b9d56..e2663732a1 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/mod.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ShortTxId, Signature, B016M, B0255, B064K, U24, U256}; use crate::Error; use core::convert::TryInto; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/option.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/option.rs index 6a6949a907..8a6899b7c8 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/option.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/option.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ super::{Signature, U24, U256}, Seq, SeqMaxLen, SeqVisitor, TryFromBSlice, diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs index 331edb34ed..d881a2c2c2 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq0255.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ super::{Signature, U24, U256}, Seq, SeqMaxLen, SeqVisitor, TryFromBSlice, diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq064k.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq064k.rs index 8c2428d913..a017095485 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq064k.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/sequences/seq064k.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ super::{Signature, B016M, B064K, U24, U256}, Seq, SeqMaxLen, SeqVisitor, TryFromBSlice, diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/short_tx_id.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/short_tx_id.rs index ec8e540336..314be2e5f5 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/short_tx_id.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/short_tx_id.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::FixedSize}; use alloc::{boxed::Box, vec::Vec}; use core::convert::TryFrom; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/signature.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/signature.rs index 9934619fac..22e74cf146 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/signature.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/signature.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::FixedSize}; use alloc::boxed::Box; use core::convert::TryFrom; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/u24.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/u24.rs index a875b454a7..649cc684be 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/u24.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/u24.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::primitives::FixedSize; use core::convert::TryFrom; use serde::{de::Visitor, ser, Deserialize, Deserializer, Serialize}; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/primitives/u256.rs b/protocols/v2/binary-sv2/serde-sv2/src/primitives/u256.rs index 778111b402..c204f4430d 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/primitives/u256.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/primitives/u256.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{error::Error, primitives::FixedSize}; use alloc::{boxed::Box, vec::Vec}; use core::convert::TryFrom; diff --git a/protocols/v2/binary-sv2/serde-sv2/src/ser.rs b/protocols/v2/binary-sv2/serde-sv2/src/ser.rs index 831c459449..8075b20c28 100644 --- a/protocols/v2/binary-sv2/serde-sv2/src/ser.rs +++ b/protocols/v2/binary-sv2/serde-sv2/src/ser.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Serde serializer for [stratum v2][Sv2] implemented following [serde tutorial][tutorial] //! //! Right now trying to serialize a value that is an invalid Sv2 type will result in a panic so diff --git a/protocols/v2/codec-sv2/examples/encrypted.rs b/protocols/v2/codec-sv2/examples/encrypted.rs index 6713c46798..17031fc7ee 100644 --- a/protocols/v2/codec-sv2/examples/encrypted.rs +++ b/protocols/v2/codec-sv2/examples/encrypted.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Using Sv2 Codec with Noise Encryption // // This example demonstrates how to use the `codec-sv2` crate to encode and decode Sv2 frames diff --git a/protocols/v2/codec-sv2/examples/unencrypted.rs b/protocols/v2/codec-sv2/examples/unencrypted.rs index 4b5d53c566..9cab90528f 100644 --- a/protocols/v2/codec-sv2/examples/unencrypted.rs +++ b/protocols/v2/codec-sv2/examples/unencrypted.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Using Sv2 Codec Without Encryption // // This example demonstrates how to use the `codec-sv2` crate to encode and decode Sv2 frames diff --git a/protocols/v2/codec-sv2/src/decoder.rs b/protocols/v2/codec-sv2/src/decoder.rs index 751ae17d53..6969c7e7fe 100644 --- a/protocols/v2/codec-sv2/src/decoder.rs +++ b/protocols/v2/codec-sv2/src/decoder.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Decoder // // Provides utilities for decoding messages held by Sv2 frames, with or without Noise protocol diff --git a/protocols/v2/codec-sv2/src/encoder.rs b/protocols/v2/codec-sv2/src/encoder.rs index 6f5f7a458d..ba68ca4551 100644 --- a/protocols/v2/codec-sv2/src/encoder.rs +++ b/protocols/v2/codec-sv2/src/encoder.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Encoder // // Provides utilities for encoding messages into Sv2 frames, with or without Noise protocol diff --git a/protocols/v2/codec-sv2/src/error.rs b/protocols/v2/codec-sv2/src/error.rs index 95fe94e479..5bd8c9ed3a 100644 --- a/protocols/v2/codec-sv2/src/error.rs +++ b/protocols/v2/codec-sv2/src/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! # Error Handling and Result Types //! //! This module defines error types and utilities for handling errors in the `codec_sv2` module. diff --git a/protocols/v2/codec-sv2/src/lib.rs b/protocols/v2/codec-sv2/src/lib.rs index 8b2c05ce9e..b3097976ec 100644 --- a/protocols/v2/codec-sv2/src/lib.rs +++ b/protocols/v2/codec-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! # Stratum V2 Codec Library //! //! `codec_sv2` provides the message encoding and decoding functionality for the Stratum V2 (Sv2) diff --git a/protocols/v2/const-sv2/src/lib.rs b/protocols/v2/const-sv2/src/lib.rs index 4d78291886..6a14ac09c9 100644 --- a/protocols/v2/const-sv2/src/lib.rs +++ b/protocols/v2/const-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! This crate provides all constants used in the SV2 protocol. //! These constants are essential for message framing, encryption, and //! protocol-specific identifiers across various SV2 components, including diff --git a/protocols/v2/framing-sv2/src/error.rs b/protocols/v2/framing-sv2/src/error.rs index 44b0c95cef..adcce7d560 100644 --- a/protocols/v2/framing-sv2/src/error.rs +++ b/protocols/v2/framing-sv2/src/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // use crate::framing2::EitherFrame; use core::fmt; diff --git a/protocols/v2/framing-sv2/src/framing.rs b/protocols/v2/framing-sv2/src/framing.rs index 1bddf16da9..6bf3d15cb5 100644 --- a/protocols/v2/framing-sv2/src/framing.rs +++ b/protocols/v2/framing-sv2/src/framing.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{header::Header, Error}; use alloc::vec::Vec; use binary_sv2::{to_writer, GetSize, Serialize}; diff --git a/protocols/v2/framing-sv2/src/header.rs b/protocols/v2/framing-sv2/src/header.rs index 3c3d871cd9..0cdbac07cf 100644 --- a/protocols/v2/framing-sv2/src/header.rs +++ b/protocols/v2/framing-sv2/src/header.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::Error; #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; diff --git a/protocols/v2/framing-sv2/src/lib.rs b/protocols/v2/framing-sv2/src/lib.rs index 4096384a93..242e5aff89 100644 --- a/protocols/v2/framing-sv2/src/lib.rs +++ b/protocols/v2/framing-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The SV2 protocol is binary, with fixed message framing. //! Each message begins with the extension type, message type, and message length (six bytes in //! total), followed by a variable length message. diff --git a/protocols/v2/noise-sv2/examples/handshake.rs b/protocols/v2/noise-sv2/examples/handshake.rs index d3d6a22645..6c62c8fd81 100644 --- a/protocols/v2/noise-sv2/examples/handshake.rs +++ b/protocols/v2/noise-sv2/examples/handshake.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Noise Protocol Handshake // // This example demonstrates how to use the `noise-sv2` crate to establish a Noise handshake diff --git a/protocols/v2/noise-sv2/src/aed_cipher.rs b/protocols/v2/noise-sv2/src/aed_cipher.rs index 5f71a9908a..f9be1b9b22 100644 --- a/protocols/v2/noise-sv2/src/aed_cipher.rs +++ b/protocols/v2/noise-sv2/src/aed_cipher.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # AEAD Cipher // // Abstracts the encryption and decryption operations for authenticated encryption with associated diff --git a/protocols/v2/noise-sv2/src/cipher_state.rs b/protocols/v2/noise-sv2/src/cipher_state.rs index 7d4414ef39..746f51bcba 100644 --- a/protocols/v2/noise-sv2/src/cipher_state.rs +++ b/protocols/v2/noise-sv2/src/cipher_state.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Cipher State Management // // Defines the [`CipherState`] trait and the [`GenericCipher`] enum, which manage the state of diff --git a/protocols/v2/noise-sv2/src/error.rs b/protocols/v2/noise-sv2/src/error.rs index 5e5be3fff0..9589304e76 100644 --- a/protocols/v2/noise-sv2/src/error.rs +++ b/protocols/v2/noise-sv2/src/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Error Handling // // Defines error types and utilities for handling errors in the `noise_sv2` module. diff --git a/protocols/v2/noise-sv2/src/handshake.rs b/protocols/v2/noise-sv2/src/handshake.rs index 38e2ef8445..a481faffca 100644 --- a/protocols/v2/noise-sv2/src/handshake.rs +++ b/protocols/v2/noise-sv2/src/handshake.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Noise Handshake Operations // // The [`HandshakeOp`] trait defines the cryptographic operations and utilities required to perform diff --git a/protocols/v2/noise-sv2/src/initiator.rs b/protocols/v2/noise-sv2/src/initiator.rs index 24a3423f35..108d0469fd 100644 --- a/protocols/v2/noise-sv2/src/initiator.rs +++ b/protocols/v2/noise-sv2/src/initiator.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Initiator Role // // Manages the [`Initiator`] role in the Noise protocol handshake for communication between Sv2 diff --git a/protocols/v2/noise-sv2/src/lib.rs b/protocols/v2/noise-sv2/src/lib.rs index ccfafd4856..f55efa8d1f 100644 --- a/protocols/v2/noise-sv2/src/lib.rs +++ b/protocols/v2/noise-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! # Noise-SV2: Noise Protocol Implementation for Stratum V2 //! //! `noise_sv2` ensures secure communication between Sv2 roles by handling encryption, decryption, diff --git a/protocols/v2/noise-sv2/src/responder.rs b/protocols/v2/noise-sv2/src/responder.rs index 633c3c963d..a17a76dac7 100644 --- a/protocols/v2/noise-sv2/src/responder.rs +++ b/protocols/v2/noise-sv2/src/responder.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Responder Role // // Manages the [`Responder`] role in the Noise protocol handshake for secure communication between diff --git a/protocols/v2/noise-sv2/src/signature_message.rs b/protocols/v2/noise-sv2/src/signature_message.rs index c82e4bd087..32dfd97e84 100644 --- a/protocols/v2/noise-sv2/src/signature_message.rs +++ b/protocols/v2/noise-sv2/src/signature_message.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // # Signature-Based Message Handling // // Defines the [`SignatureNoiseMessage`] struct, which represents a signed message used in the diff --git a/protocols/v2/noise-sv2/src/test.rs b/protocols/v2/noise-sv2/src/test.rs index 3c287fc6a0..178b4ba13d 100644 --- a/protocols/v2/noise-sv2/src/test.rs +++ b/protocols/v2/noise-sv2/src/test.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{handshake::HandshakeOp, initiator::Initiator, responder::Responder}; #[test] diff --git a/protocols/v2/roles-logic-sv2/src/channel_logic/channel_factory.rs b/protocols/v2/roles-logic-sv2/src/channel_logic/channel_factory.rs index 943349ebd2..8f340d3200 100644 --- a/protocols/v2/roles-logic-sv2/src/channel_logic/channel_factory.rs +++ b/protocols/v2/roles-logic-sv2/src/channel_logic/channel_factory.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::extended_to_standard_job; use crate::{ common_properties::StandardChannel, diff --git a/protocols/v2/roles-logic-sv2/src/channel_logic/mod.rs b/protocols/v2/roles-logic-sv2/src/channel_logic/mod.rs index 7b5f0feed7..f6cc14c137 100644 --- a/protocols/v2/roles-logic-sv2/src/channel_logic/mod.rs +++ b/protocols/v2/roles-logic-sv2/src/channel_logic/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod channel_factory; pub mod proxy_group_channel; diff --git a/protocols/v2/roles-logic-sv2/src/channel_logic/proxy_group_channel.rs b/protocols/v2/roles-logic-sv2/src/channel_logic/proxy_group_channel.rs index 65f4cdb3d8..e930ccaf65 100644 --- a/protocols/v2/roles-logic-sv2/src/channel_logic/proxy_group_channel.rs +++ b/protocols/v2/roles-logic-sv2/src/channel_logic/proxy_group_channel.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{common_properties::StandardChannel, parsers::Mining, Error}; use mining_sv2::{ diff --git a/protocols/v2/roles-logic-sv2/src/common_properties.rs b/protocols/v2/roles-logic-sv2/src/common_properties.rs index 5c25624b1e..22e3d62163 100644 --- a/protocols/v2/roles-logic-sv2/src/common_properties.rs +++ b/protocols/v2/roles-logic-sv2/src/common_properties.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Traits that implements very basic properties that every implementation should use use crate::selectors::{ DownstreamMiningSelector, DownstreamSelector, NullDownstreamMiningSelector, diff --git a/protocols/v2/roles-logic-sv2/src/errors.rs b/protocols/v2/roles-logic-sv2/src/errors.rs index 20c4bcd554..875c9943ac 100644 --- a/protocols/v2/roles-logic-sv2/src/errors.rs +++ b/protocols/v2/roles-logic-sv2/src/errors.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Errors specific to this crate use crate::{ diff --git a/protocols/v2/roles-logic-sv2/src/handlers/common.rs b/protocols/v2/roles-logic-sv2/src/handlers/common.rs index c2fb4ceb6b..f7e4ae606f 100644 --- a/protocols/v2/roles-logic-sv2/src/handlers/common.rs +++ b/protocols/v2/roles-logic-sv2/src/handlers/common.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::SendTo_; use crate::{ common_properties::CommonDownstreamData, diff --git a/protocols/v2/roles-logic-sv2/src/handlers/job_declaration.rs b/protocols/v2/roles-logic-sv2/src/handlers/job_declaration.rs index 61044fa159..4be97023c8 100644 --- a/protocols/v2/roles-logic-sv2/src/handlers/job_declaration.rs +++ b/protocols/v2/roles-logic-sv2/src/handlers/job_declaration.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{parsers::JobDeclaration, utils::Mutex}; use std::sync::Arc; pub type SendTo = SendTo_, ()>; diff --git a/protocols/v2/roles-logic-sv2/src/handlers/mining.rs b/protocols/v2/roles-logic-sv2/src/handlers/mining.rs index b5ec45e168..c789a2b110 100644 --- a/protocols/v2/roles-logic-sv2/src/handlers/mining.rs +++ b/protocols/v2/roles-logic-sv2/src/handlers/mining.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{common_properties::RequestIdMapper, errors::Error, parsers::Mining}; use core::convert::TryInto; use mining_sv2::{ diff --git a/protocols/v2/roles-logic-sv2/src/handlers/mod.rs b/protocols/v2/roles-logic-sv2/src/handlers/mod.rs index b7d39ab4e3..36d4dd5e26 100644 --- a/protocols/v2/roles-logic-sv2/src/handlers/mod.rs +++ b/protocols/v2/roles-logic-sv2/src/handlers/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Handlers are divided per (sub)protocol and per Downstream/Upstream. //! Each (sup)protocol defines a handler for both the Upstream node and the Downstream node //! Handlers are a trait called `Parse[Downstream/Upstream][(sub)protocol]` diff --git a/protocols/v2/roles-logic-sv2/src/handlers/template_distribution.rs b/protocols/v2/roles-logic-sv2/src/handlers/template_distribution.rs index fd321d0f72..b0a107cbdb 100644 --- a/protocols/v2/roles-logic-sv2/src/handlers/template_distribution.rs +++ b/protocols/v2/roles-logic-sv2/src/handlers/template_distribution.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::SendTo_; use crate::{errors::Error, parsers::TemplateDistribution, utils::Mutex}; use template_distribution_sv2::{ diff --git a/protocols/v2/roles-logic-sv2/src/job_creator.rs b/protocols/v2/roles-logic-sv2/src/job_creator.rs index 1ed6537629..5301e2dd7b 100644 --- a/protocols/v2/roles-logic-sv2/src/job_creator.rs +++ b/protocols/v2/roles-logic-sv2/src/job_creator.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The job creator module provides logic to create extended mining jobs given a template from //! a template provider as well as logic to clean up old templates when new blocks are mined use crate::{errors, utils::Id, Error}; diff --git a/protocols/v2/roles-logic-sv2/src/job_dispatcher.rs b/protocols/v2/roles-logic-sv2/src/job_dispatcher.rs index 019f9f2742..f26e1bfcf9 100644 --- a/protocols/v2/roles-logic-sv2/src/job_dispatcher.rs +++ b/protocols/v2/roles-logic-sv2/src/job_dispatcher.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The Job Dispatcher contains relevant logic to maintain group channels in proxy roles such as: //! - converting extended jobs to standard jobs //! - handling updates to jobs when new templates and prev hashes arrive, as well as cleaning up old diff --git a/protocols/v2/roles-logic-sv2/src/lib.rs b/protocols/v2/roles-logic-sv2/src/lib.rs index a38e0ad972..ab30958dcf 100644 --- a/protocols/v2/roles-logic-sv2/src/lib.rs +++ b/protocols/v2/roles-logic-sv2/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Provides all relevant types, traits and functions to implement a valid SV2 role. //! //! - For channel and job management, see [`channel_logic`], which utilizes [`job_creator`] and diff --git a/protocols/v2/roles-logic-sv2/src/parsers.rs b/protocols/v2/roles-logic-sv2/src/parsers.rs index d30ca6eced..7b43e3b107 100644 --- a/protocols/v2/roles-logic-sv2/src/parsers.rs +++ b/protocols/v2/roles-logic-sv2/src/parsers.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The parsers modules provides logic to convert raw SV2 message data into rust types //! as well as logic to handle conversions among SV2 rust types diff --git a/protocols/v2/roles-logic-sv2/src/routing_logic.rs b/protocols/v2/roles-logic-sv2/src/routing_logic.rs index f6e4f3e7bd..7e9482fe9c 100644 --- a/protocols/v2/roles-logic-sv2/src/routing_logic.rs +++ b/protocols/v2/roles-logic-sv2/src/routing_logic.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! The routing logic code is used by the handler to determine where a message should be relayed or //! responded to //! diff --git a/protocols/v2/roles-logic-sv2/src/selectors.rs b/protocols/v2/roles-logic-sv2/src/selectors.rs index b3750bdb2c..b95c1ce485 100644 --- a/protocols/v2/roles-logic-sv2/src/selectors.rs +++ b/protocols/v2/roles-logic-sv2/src/selectors.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Selectors are used from the routing logic in order to chose to which remote or set of remotes //! a message should be ralyied, or to which remote or set of remotes a message should be sent. use crate::{ diff --git a/protocols/v2/roles-logic-sv2/src/utils.rs b/protocols/v2/roles-logic-sv2/src/utils.rs index d4b6f89441..c9cec91757 100644 --- a/protocols/v2/roles-logic-sv2/src/utils.rs +++ b/protocols/v2/roles-logic-sv2/src/utils.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::{ convert::{TryFrom, TryInto}, ops::{Div, Mul}, diff --git a/protocols/v2/subprotocols/common-messages/src/channel_endpoint_changed.rs b/protocols/v2/subprotocols/common-messages/src/channel_endpoint_changed.rs index dd28091c95..fafecda7a8 100644 --- a/protocols/v2/subprotocols/common-messages/src/channel_endpoint_changed.rs +++ b/protocols/v2/subprotocols/common-messages/src/channel_endpoint_changed.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/common-messages/src/lib.rs b/protocols/v2/subprotocols/common-messages/src/lib.rs index cc0df87a2b..1d930bcb9d 100644 --- a/protocols/v2/subprotocols/common-messages/src/lib.rs +++ b/protocols/v2/subprotocols/common-messages/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(feature = "no_std", no_std)] +#![deny(missing_docs)] //! Common messages for [stratum v2][Sv2] //! The following protocol messages are common across all of the sv2 (sub)protocols. diff --git a/protocols/v2/subprotocols/common-messages/src/setup_connection.rs b/protocols/v2/subprotocols/common-messages/src/setup_connection.rs index 7bf3308325..bf4425d2ec 100644 --- a/protocols/v2/subprotocols/common-messages/src/setup_connection.rs +++ b/protocols/v2/subprotocols/common-messages/src/setup_connection.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/job-declaration/src/allocate_mining_job_token.rs b/protocols/v2/subprotocols/job-declaration/src/allocate_mining_job_token.rs index 7978691da4..2a717d054f 100644 --- a/protocols/v2/subprotocols/job-declaration/src/allocate_mining_job_token.rs +++ b/protocols/v2/subprotocols/job-declaration/src/allocate_mining_job_token.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/job-declaration/src/declare_mining_job.rs b/protocols/v2/subprotocols/job-declaration/src/declare_mining_job.rs index 6a1dc2abcc..2d5a05792f 100644 --- a/protocols/v2/subprotocols/job-declaration/src/declare_mining_job.rs +++ b/protocols/v2/subprotocols/job-declaration/src/declare_mining_job.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/job-declaration/src/identify_transactions.rs b/protocols/v2/subprotocols/job-declaration/src/identify_transactions.rs index dec4642b41..ef759d8be3 100644 --- a/protocols/v2/subprotocols/job-declaration/src/identify_transactions.rs +++ b/protocols/v2/subprotocols/job-declaration/src/identify_transactions.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/job-declaration/src/lib.rs b/protocols/v2/subprotocols/job-declaration/src/lib.rs index 4651aa9ce5..222744d844 100644 --- a/protocols/v2/subprotocols/job-declaration/src/lib.rs +++ b/protocols/v2/subprotocols/job-declaration/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(feature = "no_std", no_std)] +#![deny(missing_docs)] //! # Job Declaration Protocol //! diff --git a/protocols/v2/subprotocols/job-declaration/src/provide_missing_transactions.rs b/protocols/v2/subprotocols/job-declaration/src/provide_missing_transactions.rs index 950f81c0d8..9efff0327b 100644 --- a/protocols/v2/subprotocols/job-declaration/src/provide_missing_transactions.rs +++ b/protocols/v2/subprotocols/job-declaration/src/provide_missing_transactions.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/job-declaration/src/submit_solution.rs b/protocols/v2/subprotocols/job-declaration/src/submit_solution.rs index 9687313ced..8bd46160f7 100644 --- a/protocols/v2/subprotocols/job-declaration/src/submit_solution.rs +++ b/protocols/v2/subprotocols/job-declaration/src/submit_solution.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/close_channel.rs b/protocols/v2/subprotocols/mining/src/close_channel.rs index 8aa8a7451a..e79741a671 100644 --- a/protocols/v2/subprotocols/mining/src/close_channel.rs +++ b/protocols/v2/subprotocols/mining/src/close_channel.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/lib.rs b/protocols/v2/subprotocols/mining/src/lib.rs index 83be80d0be..42bcecd3a7 100644 --- a/protocols/v2/subprotocols/mining/src/lib.rs +++ b/protocols/v2/subprotocols/mining/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(feature = "no_std", no_std)] +#![deny(missing_docs)] //! # Mining Protocol //! ## Channels diff --git a/protocols/v2/subprotocols/mining/src/new_mining_job.rs b/protocols/v2/subprotocols/mining/src/new_mining_job.rs index 042f17e680..8938d44b04 100644 --- a/protocols/v2/subprotocols/mining/src/new_mining_job.rs +++ b/protocols/v2/subprotocols/mining/src/new_mining_job.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/open_channel.rs b/protocols/v2/subprotocols/mining/src/open_channel.rs index d64b1d0a7e..e2fe536abd 100644 --- a/protocols/v2/subprotocols/mining/src/open_channel.rs +++ b/protocols/v2/subprotocols/mining/src/open_channel.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use alloc::string::ToString; #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; diff --git a/protocols/v2/subprotocols/mining/src/reconnect.rs b/protocols/v2/subprotocols/mining/src/reconnect.rs index 27cbe033dc..a9f3c465c7 100644 --- a/protocols/v2/subprotocols/mining/src/reconnect.rs +++ b/protocols/v2/subprotocols/mining/src/reconnect.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/set_custom_mining_job.rs b/protocols/v2/subprotocols/mining/src/set_custom_mining_job.rs index c4138e4494..fc9fc9c61b 100644 --- a/protocols/v2/subprotocols/mining/src/set_custom_mining_job.rs +++ b/protocols/v2/subprotocols/mining/src/set_custom_mining_job.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/set_extranonce_prefix.rs b/protocols/v2/subprotocols/mining/src/set_extranonce_prefix.rs index 140fdf1d3f..87d6ea85fa 100644 --- a/protocols/v2/subprotocols/mining/src/set_extranonce_prefix.rs +++ b/protocols/v2/subprotocols/mining/src/set_extranonce_prefix.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/set_group_channel.rs b/protocols/v2/subprotocols/mining/src/set_group_channel.rs index 73fca2c888..68f2b326d8 100644 --- a/protocols/v2/subprotocols/mining/src/set_group_channel.rs +++ b/protocols/v2/subprotocols/mining/src/set_group_channel.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/set_new_prev_hash.rs b/protocols/v2/subprotocols/mining/src/set_new_prev_hash.rs index 7b76b1ef24..a791288209 100644 --- a/protocols/v2/subprotocols/mining/src/set_new_prev_hash.rs +++ b/protocols/v2/subprotocols/mining/src/set_new_prev_hash.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/set_target.rs b/protocols/v2/subprotocols/mining/src/set_target.rs index 672233118a..20bbc3aa3d 100644 --- a/protocols/v2/subprotocols/mining/src/set_target.rs +++ b/protocols/v2/subprotocols/mining/src/set_target.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/submit_shares.rs b/protocols/v2/subprotocols/mining/src/submit_shares.rs index 5c8bea64f6..343ea50b4f 100644 --- a/protocols/v2/subprotocols/mining/src/submit_shares.rs +++ b/protocols/v2/subprotocols/mining/src/submit_shares.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/mining/src/update_channel.rs b/protocols/v2/subprotocols/mining/src/update_channel.rs index a8843213c9..1ca77c7603 100644 --- a/protocols/v2/subprotocols/mining/src/update_channel.rs +++ b/protocols/v2/subprotocols/mining/src/update_channel.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/template-distribution/src/coinbase_output_data_size.rs b/protocols/v2/subprotocols/template-distribution/src/coinbase_output_data_size.rs index 0e8ee7513d..9171d47fd7 100644 --- a/protocols/v2/subprotocols/template-distribution/src/coinbase_output_data_size.rs +++ b/protocols/v2/subprotocols/template-distribution/src/coinbase_output_data_size.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/template-distribution/src/lib.rs b/protocols/v2/subprotocols/template-distribution/src/lib.rs index 82d50facdc..41f33bf125 100644 --- a/protocols/v2/subprotocols/template-distribution/src/lib.rs +++ b/protocols/v2/subprotocols/template-distribution/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(feature = "no_std", no_std)] +#![deny(missing_docs)] //! # Template Distribution Protocol //! The Template Distribution protocol is used to receive updates of the block template to use in diff --git a/protocols/v2/subprotocols/template-distribution/src/new_template.rs b/protocols/v2/subprotocols/template-distribution/src/new_template.rs index b5b01fb4bc..a7d2349669 100644 --- a/protocols/v2/subprotocols/template-distribution/src/new_template.rs +++ b/protocols/v2/subprotocols/template-distribution/src/new_template.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/template-distribution/src/request_transaction_data.rs b/protocols/v2/subprotocols/template-distribution/src/request_transaction_data.rs index 93eeb72d1f..f3d17507d2 100644 --- a/protocols/v2/subprotocols/template-distribution/src/request_transaction_data.rs +++ b/protocols/v2/subprotocols/template-distribution/src/request_transaction_data.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/template-distribution/src/set_new_prev_hash.rs b/protocols/v2/subprotocols/template-distribution/src/set_new_prev_hash.rs index a36a0de972..a55a619d50 100644 --- a/protocols/v2/subprotocols/template-distribution/src/set_new_prev_hash.rs +++ b/protocols/v2/subprotocols/template-distribution/src/set_new_prev_hash.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/subprotocols/template-distribution/src/submit_solution.rs b/protocols/v2/subprotocols/template-distribution/src/submit_solution.rs index 7d633b905e..e45e566448 100644 --- a/protocols/v2/subprotocols/template-distribution/src/submit_solution.rs +++ b/protocols/v2/subprotocols/template-distribution/src/submit_solution.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(not(feature = "with_serde"))] use alloc::vec::Vec; #[cfg(not(feature = "with_serde"))] diff --git a/protocols/v2/sv2-ffi/src/lib.rs b/protocols/v2/sv2-ffi/src/lib.rs index f9d2a15506..5a15e6eb8f 100644 --- a/protocols/v2/sv2-ffi/src/lib.rs +++ b/protocols/v2/sv2-ffi/src/lib.rs @@ -1,4 +1,5 @@ #![cfg(not(feature = "with_serde"))] +#![deny(missing_docs)] use std::{ fmt, fmt::{Display, Formatter}, diff --git a/roles/jd-client/src/args.rs b/roles/jd-client/src/args.rs index 7802351c31..256011b280 100644 --- a/roles/jd-client/src/args.rs +++ b/roles/jd-client/src/args.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::path::PathBuf; #[derive(Debug)] diff --git a/roles/jd-client/src/lib/downstream.rs b/roles/jd-client/src/lib/downstream.rs index 82a8076022..72ee5ff04c 100644 --- a/roles/jd-client/src/lib/downstream.rs +++ b/roles/jd-client/src/lib/downstream.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ job_declarator::JobDeclarator, status::{self, State}, diff --git a/roles/jd-client/src/lib/error.rs b/roles/jd-client/src/lib/error.rs index f29decb3d6..a35443d44f 100644 --- a/roles/jd-client/src/lib/error.rs +++ b/roles/jd-client/src/lib/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use ext_config::ConfigError; use std::fmt; diff --git a/roles/jd-client/src/lib/job_declarator/message_handler.rs b/roles/jd-client/src/lib/job_declarator/message_handler.rs index 72d58a9126..fde2712801 100644 --- a/roles/jd-client/src/lib/job_declarator/message_handler.rs +++ b/roles/jd-client/src/lib/job_declarator/message_handler.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::JobDeclarator; use roles_logic_sv2::{ handlers::{job_declaration::ParseServerJobDeclarationMessages, SendTo_}, diff --git a/roles/jd-client/src/lib/job_declarator/mod.rs b/roles/jd-client/src/lib/job_declarator/mod.rs index 1c019c85de..4dc60db04c 100644 --- a/roles/jd-client/src/lib/job_declarator/mod.rs +++ b/roles/jd-client/src/lib/job_declarator/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod message_handler; use async_channel::{Receiver, Sender}; use binary_sv2::{Seq0255, Seq064K, B016M, B064K, U256}; diff --git a/roles/jd-client/src/lib/job_declarator/setup_connection.rs b/roles/jd-client/src/lib/job_declarator/setup_connection.rs index 0e7b6fd8aa..f31bcaa1ea 100644 --- a/roles/jd-client/src/lib/job_declarator/setup_connection.rs +++ b/roles/jd-client/src/lib/job_declarator/setup_connection.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{Receiver, Sender}; use codec_sv2::{StandardEitherFrame, StandardSv2Frame}; use roles_logic_sv2::{ diff --git a/roles/jd-client/src/lib/mod.rs b/roles/jd-client/src/lib/mod.rs index 467ac52b54..c81684b027 100644 --- a/roles/jd-client/src/lib/mod.rs +++ b/roles/jd-client/src/lib/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod downstream; pub mod error; pub mod job_declarator; diff --git a/roles/jd-client/src/lib/proxy_config.rs b/roles/jd-client/src/lib/proxy_config.rs index f1df8fc452..fe5277d71c 100644 --- a/roles/jd-client/src/lib/proxy_config.rs +++ b/roles/jd-client/src/lib/proxy_config.rs @@ -1,4 +1,5 @@ #![allow(dead_code)] +#![deny(missing_docs)] use key_utils::{Secp256k1PublicKey, Secp256k1SecretKey}; use roles_logic_sv2::{errors::Error, utils::CoinbaseOutput as CoinbaseOutput_}; use serde::Deserialize; diff --git a/roles/jd-client/src/lib/status.rs b/roles/jd-client/src/lib/status.rs index 292a4037a8..7c2ee1ef37 100644 --- a/roles/jd-client/src/lib/status.rs +++ b/roles/jd-client/src/lib/status.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::error::{self, Error}; #[derive(Debug)] diff --git a/roles/jd-client/src/lib/template_receiver/message_handler.rs b/roles/jd-client/src/lib/template_receiver/message_handler.rs index 61311f850f..87758b00c8 100644 --- a/roles/jd-client/src/lib/template_receiver/message_handler.rs +++ b/roles/jd-client/src/lib/template_receiver/message_handler.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::TemplateRx; use roles_logic_sv2::{ errors::Error, diff --git a/roles/jd-client/src/lib/template_receiver/mod.rs b/roles/jd-client/src/lib/template_receiver/mod.rs index 63b13ad347..666ab70dba 100644 --- a/roles/jd-client/src/lib/template_receiver/mod.rs +++ b/roles/jd-client/src/lib/template_receiver/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{job_declarator::JobDeclarator, status, PoolChangerTrigger}; use async_channel::{Receiver, Sender}; use codec_sv2::{HandshakeRole, Initiator, StandardEitherFrame, StandardSv2Frame}; diff --git a/roles/jd-client/src/lib/template_receiver/setup_connection.rs b/roles/jd-client/src/lib/template_receiver/setup_connection.rs index 505b945c3e..5bb2b6ee18 100644 --- a/roles/jd-client/src/lib/template_receiver/setup_connection.rs +++ b/roles/jd-client/src/lib/template_receiver/setup_connection.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{Receiver, Sender}; use codec_sv2::{StandardEitherFrame, StandardSv2Frame}; use roles_logic_sv2::{ diff --git a/roles/jd-client/src/lib/upstream_sv2/mod.rs b/roles/jd-client/src/lib/upstream_sv2/mod.rs index 70adb2dc9d..552f05fae7 100644 --- a/roles/jd-client/src/lib/upstream_sv2/mod.rs +++ b/roles/jd-client/src/lib/upstream_sv2/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use codec_sv2::{StandardEitherFrame, StandardSv2Frame}; use roles_logic_sv2::parsers::PoolMessages; diff --git a/roles/jd-client/src/lib/upstream_sv2/upstream.rs b/roles/jd-client/src/lib/upstream_sv2/upstream.rs index db580f563b..2a2788fb5d 100644 --- a/roles/jd-client/src/lib/upstream_sv2/upstream.rs +++ b/roles/jd-client/src/lib/upstream_sv2/upstream.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::super::downstream::DownstreamMiningNode as Downstream; use super::super::{ diff --git a/roles/jd-client/src/main.rs b/roles/jd-client/src/main.rs index edb4ec47a5..3c6e6dccdd 100644 --- a/roles/jd-client/src/main.rs +++ b/roles/jd-client/src/main.rs @@ -1,4 +1,5 @@ #![allow(special_module_name)] +#![deny(missing_docs)] mod args; mod lib; diff --git a/roles/jd-server/src/lib/error.rs b/roles/jd-server/src/lib/error.rs index 7b58c75939..288d8d586f 100644 --- a/roles/jd-server/src/lib/error.rs +++ b/roles/jd-server/src/lib/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::{ convert::From, fmt::Debug, diff --git a/roles/jd-server/src/lib/job_declarator/message_handler.rs b/roles/jd-server/src/lib/job_declarator/message_handler.rs index cd75e86af7..83367111b0 100644 --- a/roles/jd-server/src/lib/job_declarator/message_handler.rs +++ b/roles/jd-server/src/lib/job_declarator/message_handler.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use binary_sv2::ShortTxId; use roles_logic_sv2::{ handlers::{job_declaration::ParseClientJobDeclarationMessages, SendTo_}, diff --git a/roles/jd-server/src/lib/job_declarator/mod.rs b/roles/jd-server/src/lib/job_declarator/mod.rs index 9e775bc927..51634b078d 100644 --- a/roles/jd-server/src/lib/job_declarator/mod.rs +++ b/roles/jd-server/src/lib/job_declarator/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod message_handler; use super::{error::JdsError, mempool::JDsMempool, status, Configuration, EitherFrame, StdFrame}; use async_channel::{Receiver, Sender}; diff --git a/roles/jd-server/src/lib/mempool/error.rs b/roles/jd-server/src/lib/mempool/error.rs index f2ce316e84..a3c605b81b 100644 --- a/roles/jd-server/src/lib/mempool/error.rs +++ b/roles/jd-server/src/lib/mempool/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use rpc_sv2::mini_rpc_client::RpcError; use std::{convert::From, sync::PoisonError}; use tracing::{error, warn}; diff --git a/roles/jd-server/src/lib/mempool/mod.rs b/roles/jd-server/src/lib/mempool/mod.rs index 0541593b46..63f07c3850 100644 --- a/roles/jd-server/src/lib/mempool/mod.rs +++ b/roles/jd-server/src/lib/mempool/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod error; use super::job_declarator::AddTrasactionsToMempoolInner; use crate::mempool::error::JdsMempoolError; diff --git a/roles/jd-server/src/lib/mod.rs b/roles/jd-server/src/lib/mod.rs index aeee1aa8ab..a3a24f9016 100644 --- a/roles/jd-server/src/lib/mod.rs +++ b/roles/jd-server/src/lib/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod error; pub mod job_declarator; pub mod mempool; diff --git a/roles/jd-server/src/lib/status.rs b/roles/jd-server/src/lib/status.rs index e0668d307c..a0af3fb9b8 100644 --- a/roles/jd-server/src/lib/status.rs +++ b/roles/jd-server/src/lib/status.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use roles_logic_sv2::parsers::Mining; use super::error::JdsError; diff --git a/roles/jd-server/src/main.rs b/roles/jd-server/src/main.rs index da220e9393..b5db451f69 100644 --- a/roles/jd-server/src/main.rs +++ b/roles/jd-server/src/main.rs @@ -1,4 +1,5 @@ #![allow(special_module_name)] +#![deny(missing_docs)] pub use crate::lib::{ mempool::{self}, status, Configuration, diff --git a/roles/mining-proxy/src/lib/downstream_mining.rs b/roles/mining-proxy/src/lib/downstream_mining.rs index da8901c49c..595a47466e 100644 --- a/roles/mining-proxy/src/lib/downstream_mining.rs +++ b/roles/mining-proxy/src/lib/downstream_mining.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::{convert::TryInto, sync::Arc}; use async_channel::{Receiver, SendError, Sender}; diff --git a/roles/mining-proxy/src/lib/error.rs b/roles/mining-proxy/src/lib/error.rs index 75ded3a67a..3272aef658 100644 --- a/roles/mining-proxy/src/lib/error.rs +++ b/roles/mining-proxy/src/lib/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::SendError; use codec_sv2::StandardEitherFrame; use roles_logic_sv2::parsers::PoolMessages; diff --git a/roles/mining-proxy/src/lib/mod.rs b/roles/mining-proxy/src/lib/mod.rs index 8c7a8563d7..b0a620f9d5 100644 --- a/roles/mining-proxy/src/lib/mod.rs +++ b/roles/mining-proxy/src/lib/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod downstream_mining; pub mod error; pub mod upstream_mining; diff --git a/roles/mining-proxy/src/lib/upstream_mining.rs b/roles/mining-proxy/src/lib/upstream_mining.rs index dde1e4c04b..6e1028a215 100644 --- a/roles/mining-proxy/src/lib/upstream_mining.rs +++ b/roles/mining-proxy/src/lib/upstream_mining.rs @@ -1,4 +1,5 @@ #![allow(dead_code)] +#![deny(missing_docs)] use core::convert::TryInto; use std::{collections::HashMap, net::SocketAddr, sync::Arc, time::Duration}; diff --git a/roles/mining-proxy/src/main.rs b/roles/mining-proxy/src/main.rs index 4472398e8e..7e33211fc7 100644 --- a/roles/mining-proxy/src/main.rs +++ b/roles/mining-proxy/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] //! Configurable Sv2 it support extended and group channel //! Upstream means another proxy or a pool //! Downstream means another proxy or a mining device diff --git a/roles/pool/src/lib/error.rs b/roles/pool/src/lib/error.rs index ead10b8fa5..f45b42a9b9 100644 --- a/roles/pool/src/lib/error.rs +++ b/roles/pool/src/lib/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::{ convert::From, fmt::Debug, diff --git a/roles/pool/src/lib/mining_pool/message_handler.rs b/roles/pool/src/lib/mining_pool/message_handler.rs index 8d8b1ce882..8a6b19633d 100644 --- a/roles/pool/src/lib/mining_pool/message_handler.rs +++ b/roles/pool/src/lib/mining_pool/message_handler.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::super::mining_pool::Downstream; use roles_logic_sv2::{ errors::Error, diff --git a/roles/pool/src/lib/mining_pool/mod.rs b/roles/pool/src/lib/mining_pool/mod.rs index 2b179c7885..6f62f35144 100644 --- a/roles/pool/src/lib/mining_pool/mod.rs +++ b/roles/pool/src/lib/mining_pool/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ error::{PoolError, PoolResult}, status, diff --git a/roles/pool/src/lib/mining_pool/setup_connection.rs b/roles/pool/src/lib/mining_pool/setup_connection.rs index f0c47e9a88..a4dd35ca48 100644 --- a/roles/pool/src/lib/mining_pool/setup_connection.rs +++ b/roles/pool/src/lib/mining_pool/setup_connection.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::super::{ error::{PoolError, PoolResult}, mining_pool::{EitherFrame, StdFrame}, diff --git a/roles/pool/src/lib/mod.rs b/roles/pool/src/lib/mod.rs index 2603695f88..c95955d0d8 100644 --- a/roles/pool/src/lib/mod.rs +++ b/roles/pool/src/lib/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod error; pub mod mining_pool; pub mod status; diff --git a/roles/pool/src/lib/status.rs b/roles/pool/src/lib/status.rs index a237b319f3..3a8d4ee4fb 100644 --- a/roles/pool/src/lib/status.rs +++ b/roles/pool/src/lib/status.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use roles_logic_sv2::parsers::Mining; use super::error::PoolError; diff --git a/roles/pool/src/lib/template_receiver/message_handler.rs b/roles/pool/src/lib/template_receiver/message_handler.rs index c3adab9e27..54699c889d 100644 --- a/roles/pool/src/lib/template_receiver/message_handler.rs +++ b/roles/pool/src/lib/template_receiver/message_handler.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::TemplateRx; use roles_logic_sv2::{ errors::Error, diff --git a/roles/pool/src/lib/template_receiver/mod.rs b/roles/pool/src/lib/template_receiver/mod.rs index 2eeaa554f8..73d8e08683 100644 --- a/roles/pool/src/lib/template_receiver/mod.rs +++ b/roles/pool/src/lib/template_receiver/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{ error::{PoolError, PoolResult}, mining_pool::{EitherFrame, StdFrame}, diff --git a/roles/pool/src/lib/template_receiver/setup_connection.rs b/roles/pool/src/lib/template_receiver/setup_connection.rs index f2dedca3bb..7993ce4511 100644 --- a/roles/pool/src/lib/template_receiver/setup_connection.rs +++ b/roles/pool/src/lib/template_receiver/setup_connection.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::super::{ error::{PoolError, PoolResult}, mining_pool::{EitherFrame, StdFrame}, diff --git a/roles/pool/src/main.rs b/roles/pool/src/main.rs index 34f5983e59..d45ff8f29c 100644 --- a/roles/pool/src/main.rs +++ b/roles/pool/src/main.rs @@ -1,4 +1,5 @@ #![allow(special_module_name)] +#![deny(missing_docs)] mod lib; use ext_config::{Config, File, FileFormat}; diff --git a/roles/roles-utils/network-helpers/src/lib.rs b/roles/roles-utils/network-helpers/src/lib.rs index 738ff8c384..84c3301ed5 100644 --- a/roles/roles-utils/network-helpers/src/lib.rs +++ b/roles/roles-utils/network-helpers/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] #[cfg(feature = "async_std")] mod noise_connection_async_std; #[cfg(feature = "async_std")] diff --git a/roles/roles-utils/network-helpers/src/noise_connection_async_std.rs b/roles/roles-utils/network-helpers/src/noise_connection_async_std.rs index ae40529037..e97f89a13a 100644 --- a/roles/roles-utils/network-helpers/src/noise_connection_async_std.rs +++ b/roles/roles-utils/network-helpers/src/noise_connection_async_std.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{bounded, Receiver, Sender}; use async_std::{ net::{TcpListener, TcpStream}, diff --git a/roles/roles-utils/network-helpers/src/noise_connection_tokio.rs b/roles/roles-utils/network-helpers/src/noise_connection_tokio.rs index 0fe9793f4a..a417a88075 100644 --- a/roles/roles-utils/network-helpers/src/noise_connection_tokio.rs +++ b/roles/roles-utils/network-helpers/src/noise_connection_tokio.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::Error; use async_channel::{bounded, Receiver, Sender}; use binary_sv2::{Deserialize, Serialize}; diff --git a/roles/roles-utils/network-helpers/src/plain_connection_async_std.rs b/roles/roles-utils/network-helpers/src/plain_connection_async_std.rs index e97accfe74..81e8d255ce 100644 --- a/roles/roles-utils/network-helpers/src/plain_connection_async_std.rs +++ b/roles/roles-utils/network-helpers/src/plain_connection_async_std.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{bounded, Receiver, Sender}; use async_std::{ net::{TcpListener, TcpStream}, diff --git a/roles/roles-utils/network-helpers/src/plain_connection_tokio.rs b/roles/roles-utils/network-helpers/src/plain_connection_tokio.rs index a269f4424a..9265b76420 100644 --- a/roles/roles-utils/network-helpers/src/plain_connection_tokio.rs +++ b/roles/roles-utils/network-helpers/src/plain_connection_tokio.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{bounded, Receiver, Sender}; use binary_sv2::{Deserialize, Serialize}; use core::convert::TryInto; diff --git a/roles/roles-utils/rpc/src/lib.rs b/roles/roles-utils/rpc/src/lib.rs index e3204e86af..1dd256921c 100644 --- a/roles/roles-utils/rpc/src/lib.rs +++ b/roles/roles-utils/rpc/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod mini_rpc_client; use serde::{Deserialize, Serialize}; diff --git a/roles/roles-utils/rpc/src/mini_rpc_client.rs b/roles/roles-utils/rpc/src/mini_rpc_client.rs index d0ce084351..3f8ce6148d 100644 --- a/roles/roles-utils/rpc/src/mini_rpc_client.rs +++ b/roles/roles-utils/rpc/src/mini_rpc_client.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] // TODO // - manage id in RpcResult messages use base64::Engine; diff --git a/roles/test-utils/mining-device-sv1/src/client.rs b/roles/test-utils/mining-device-sv1/src/client.rs index be2e5062e7..fd48e0b781 100644 --- a/roles/test-utils/mining-device-sv1/src/client.rs +++ b/roles/test-utils/mining-device-sv1/src/client.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_std::net::TcpStream; use std::{convert::TryInto, net::SocketAddr, ops::Div}; diff --git a/roles/test-utils/mining-device-sv1/src/job.rs b/roles/test-utils/mining-device-sv1/src/job.rs index 1d6b3d2bcd..1904887c74 100644 --- a/roles/test-utils/mining-device-sv1/src/job.rs +++ b/roles/test-utils/mining-device-sv1/src/job.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::convert::TryInto; use v1::server_to_client; diff --git a/roles/test-utils/mining-device-sv1/src/lib.rs b/roles/test-utils/mining-device-sv1/src/lib.rs index 4a3dd2a1e3..a5e8cf264b 100644 --- a/roles/test-utils/mining-device-sv1/src/lib.rs +++ b/roles/test-utils/mining-device-sv1/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod client; pub mod job; pub mod miner; diff --git a/roles/test-utils/mining-device-sv1/src/main.rs b/roles/test-utils/mining-device-sv1/src/main.rs index f34df28d54..00e56c24f0 100644 --- a/roles/test-utils/mining-device-sv1/src/main.rs +++ b/roles/test-utils/mining-device-sv1/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub(crate) mod client; pub(crate) mod job; pub(crate) mod miner; diff --git a/roles/test-utils/mining-device-sv1/src/miner.rs b/roles/test-utils/mining-device-sv1/src/miner.rs index c63af5a966..38659d69e7 100644 --- a/roles/test-utils/mining-device-sv1/src/miner.rs +++ b/roles/test-utils/mining-device-sv1/src/miner.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::job::Job; use std::convert::TryInto; use stratum_common::bitcoin::{ diff --git a/roles/test-utils/mining-device/src/lib/mod.rs b/roles/test-utils/mining-device/src/lib/mod.rs index ab07c092e9..bd6cf42b18 100644 --- a/roles/test-utils/mining-device/src/lib/mod.rs +++ b/roles/test-utils/mining-device/src/lib/mod.rs @@ -1,4 +1,5 @@ #![allow(clippy::option_map_unit_fn)] +#![deny(missing_docs)] use key_utils::Secp256k1PublicKey; use network_helpers_sv2::noise_connection_tokio::Connection; use roles_logic_sv2::utils::Id; diff --git a/roles/test-utils/mining-device/src/main.rs b/roles/test-utils/mining-device/src/main.rs index 74bff1b3f2..f47721f110 100644 --- a/roles/test-utils/mining-device/src/main.rs +++ b/roles/test-utils/mining-device/src/main.rs @@ -1,4 +1,5 @@ #![allow(special_module_name)] +#![deny(missing_docs)] #![allow(clippy::option_map_unit_fn)] use key_utils::Secp256k1PublicKey; diff --git a/roles/tests-integration/tests/common/mod.rs b/roles/tests-integration/tests/common/mod.rs index 782b56ad5e..0d18744829 100644 --- a/roles/tests-integration/tests/common/mod.rs +++ b/roles/tests-integration/tests/common/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] mod sniffer; use bitcoind::{bitcoincore_rpc::RpcApi, BitcoinD, Conf}; diff --git a/roles/tests-integration/tests/common/sniffer.rs b/roles/tests-integration/tests/common/sniffer.rs index 985f1ba92f..f11fba40ee 100644 --- a/roles/tests-integration/tests/common/sniffer.rs +++ b/roles/tests-integration/tests/common/sniffer.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{Receiver, Sender}; use codec_sv2::{ framing_sv2::framing::Frame, HandshakeRole, Initiator, Responder, StandardEitherFrame, Sv2Frame, diff --git a/roles/tests-integration/tests/pool_integration.rs b/roles/tests-integration/tests/pool_integration.rs index 6230d43249..36c5b6b2d0 100644 --- a/roles/tests-integration/tests/pool_integration.rs +++ b/roles/tests-integration/tests/pool_integration.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] mod common; use std::convert::TryInto; diff --git a/roles/translator/src/args.rs b/roles/translator/src/args.rs index bf5e51c19d..4494ddffa4 100644 --- a/roles/translator/src/args.rs +++ b/roles/translator/src/args.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::path::PathBuf; #[derive(Debug)] diff --git a/roles/translator/src/lib/downstream_sv1/diff_management.rs b/roles/translator/src/lib/downstream_sv1/diff_management.rs index 132e902357..06fc2e27ec 100644 --- a/roles/translator/src/lib/downstream_sv1/diff_management.rs +++ b/roles/translator/src/lib/downstream_sv1/diff_management.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{Downstream, DownstreamMessages, SetDownstreamTarget}; use super::super::error::{Error, ProxyResult}; diff --git a/roles/translator/src/lib/downstream_sv1/downstream.rs b/roles/translator/src/lib/downstream_sv1/downstream.rs index 5dfa33a3b9..291d398cf1 100644 --- a/roles/translator/src/lib/downstream_sv1/downstream.rs +++ b/roles/translator/src/lib/downstream_sv1/downstream.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ downstream_sv1, error::ProxyResult, diff --git a/roles/translator/src/lib/downstream_sv1/mod.rs b/roles/translator/src/lib/downstream_sv1/mod.rs index bf72a9c8c4..03a8167b50 100644 --- a/roles/translator/src/lib/downstream_sv1/mod.rs +++ b/roles/translator/src/lib/downstream_sv1/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use roles_logic_sv2::mining_sv2::Target; use v1::{client_to_server::Submit, utils::HexU32Be}; pub mod diff_management; diff --git a/roles/translator/src/lib/error.rs b/roles/translator/src/lib/error.rs index 8abd616905..7498d104c3 100644 --- a/roles/translator/src/lib/error.rs +++ b/roles/translator/src/lib/error.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use ext_config::ConfigError; use roles_logic_sv2::{ mining_sv2::{ExtendedExtranonce, NewExtendedMiningJob, SetCustomMiningJob}, diff --git a/roles/translator/src/lib/mod.rs b/roles/translator/src/lib/mod.rs index 7b47a40e6b..ba6407d17c 100644 --- a/roles/translator/src/lib/mod.rs +++ b/roles/translator/src/lib/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{bounded, unbounded}; use futures::FutureExt; use rand::Rng; diff --git a/roles/translator/src/lib/proxy/bridge.rs b/roles/translator/src/lib/proxy/bridge.rs index 1525217570..a5b9798fb7 100644 --- a/roles/translator/src/lib/proxy/bridge.rs +++ b/roles/translator/src/lib/proxy/bridge.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use async_channel::{Receiver, Sender}; use roles_logic_sv2::{ channel_logic::channel_factory::{ExtendedChannelKind, ProxyExtendedChannelFactory, Share}, diff --git a/roles/translator/src/lib/proxy/mod.rs b/roles/translator/src/lib/proxy/mod.rs index e2231be1dd..1a872a8505 100644 --- a/roles/translator/src/lib/proxy/mod.rs +++ b/roles/translator/src/lib/proxy/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] pub mod bridge; pub mod next_mining_notify; pub use bridge::Bridge; diff --git a/roles/translator/src/lib/proxy/next_mining_notify.rs b/roles/translator/src/lib/proxy/next_mining_notify.rs index 7bcaf44f1a..c21cc9b817 100644 --- a/roles/translator/src/lib/proxy/next_mining_notify.rs +++ b/roles/translator/src/lib/proxy/next_mining_notify.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use roles_logic_sv2::{ job_creator::extended_job_to_non_segwit, mining_sv2::{NewExtendedMiningJob, SetNewPrevHash}, diff --git a/roles/translator/src/lib/proxy_config.rs b/roles/translator/src/lib/proxy_config.rs index ec3711c5d6..34a9b23bc3 100644 --- a/roles/translator/src/lib/proxy_config.rs +++ b/roles/translator/src/lib/proxy_config.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use key_utils::Secp256k1PublicKey; use serde::Deserialize; diff --git a/roles/translator/src/lib/status.rs b/roles/translator/src/lib/status.rs index e8af6883e1..06770937b7 100644 --- a/roles/translator/src/lib/status.rs +++ b/roles/translator/src/lib/status.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::error::{self, Error}; #[derive(Debug)] diff --git a/roles/translator/src/lib/upstream_sv2/diff_management.rs b/roles/translator/src/lib/upstream_sv2/diff_management.rs index 830bf28d8f..47e647e484 100644 --- a/roles/translator/src/lib/upstream_sv2/diff_management.rs +++ b/roles/translator/src/lib/upstream_sv2/diff_management.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::Upstream; use super::super::{ diff --git a/roles/translator/src/lib/upstream_sv2/mod.rs b/roles/translator/src/lib/upstream_sv2/mod.rs index ba365bae15..7dfd7f4037 100644 --- a/roles/translator/src/lib/upstream_sv2/mod.rs +++ b/roles/translator/src/lib/upstream_sv2/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use codec_sv2::{StandardEitherFrame, StandardSv2Frame}; use roles_logic_sv2::parsers::PoolMessages; diff --git a/roles/translator/src/lib/upstream_sv2/upstream.rs b/roles/translator/src/lib/upstream_sv2/upstream.rs index c025c14071..39323d405d 100644 --- a/roles/translator/src/lib/upstream_sv2/upstream.rs +++ b/roles/translator/src/lib/upstream_sv2/upstream.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ downstream_sv1::Downstream, error::{ diff --git a/roles/translator/src/lib/upstream_sv2/upstream_connection.rs b/roles/translator/src/lib/upstream_sv2/upstream_connection.rs index 49392b78e4..f97bec5470 100644 --- a/roles/translator/src/lib/upstream_sv2/upstream_connection.rs +++ b/roles/translator/src/lib/upstream_sv2/upstream_connection.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::{super::error::ProxyResult, EitherFrame, StdFrame}; use async_channel::{Receiver, Sender}; diff --git a/roles/translator/src/lib/utils.rs b/roles/translator/src/lib/utils.rs index e712eb47f8..7dfdea1a01 100644 --- a/roles/translator/src/lib/utils.rs +++ b/roles/translator/src/lib/utils.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] /// currently the pool only supports 16 bytes exactly for its channels /// to use but that may change pub fn proxy_extranonce1_len( diff --git a/roles/translator/src/main.rs b/roles/translator/src/main.rs index 4218f1b8e6..ff4c3804e1 100644 --- a/roles/translator/src/main.rs +++ b/roles/translator/src/main.rs @@ -1,4 +1,5 @@ #![allow(special_module_name)] +#![deny(missing_docs)] mod args; mod lib; diff --git a/test/scale/src/main.rs b/test/scale/src/main.rs index 0e9872c6b7..a6f2a64d0d 100644 --- a/test/scale/src/main.rs +++ b/test/scale/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::thread; use tokio::{ net::{TcpListener, TcpStream}, diff --git a/utils/bip32-key-derivation/src/lib.rs b/utils/bip32-key-derivation/src/lib.rs index b6d1649726..0e3b599462 100644 --- a/utils/bip32-key-derivation/src/lib.rs +++ b/utils/bip32-key-derivation/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::str::FromStr; use stratum_common::bitcoin::{ secp256k1::Secp256k1, diff --git a/utils/bip32-key-derivation/src/main.rs b/utils/bip32-key-derivation/src/main.rs index 71acfbd620..51c8230ac9 100644 --- a/utils/bip32-key-derivation/src/main.rs +++ b/utils/bip32-key-derivation/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use std::env; use stratum_common::bitcoin::util::bip32::ExtendedPubKey; diff --git a/utils/buffer/benches/control_struct.rs b/utils/buffer/benches/control_struct.rs index 7369d1d42c..22c60363eb 100644 --- a/utils/buffer/benches/control_struct.rs +++ b/utils/buffer/benches/control_struct.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use buffer_sv2::{Buffer, Slice}; use std::sync::{Arc, Mutex}; diff --git a/utils/buffer/benches/pool_benchmark.rs b/utils/buffer/benches/pool_benchmark.rs index afa0c221ba..7b24e066a0 100644 --- a/utils/buffer/benches/pool_benchmark.rs +++ b/utils/buffer/benches/pool_benchmark.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use core::sync::atomic::Ordering; use criterion::{criterion_group, criterion_main, Criterion}; diff --git a/utils/buffer/benches/pool_iai.rs b/utils/buffer/benches/pool_iai.rs index 296e9b7984..dd34af9843 100644 --- a/utils/buffer/benches/pool_iai.rs +++ b/utils/buffer/benches/pool_iai.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use buffer_sv2::{Buffer, BufferFromSystemMemory as BufferFromMemory, BufferPool as Pool}; use core::time::Duration; use rand::Rng; diff --git a/utils/buffer/fuzz/fuzz_targets/faster.rs b/utils/buffer/fuzz/fuzz_targets/faster.rs index 0eac64dc3b..4d6ef65877 100644 --- a/utils/buffer/fuzz/fuzz_targets/faster.rs +++ b/utils/buffer/fuzz/fuzz_targets/faster.rs @@ -1,4 +1,5 @@ #![no_main] +#![deny(missing_docs)] use arbitrary::Arbitrary; use buffer_sv2::BufferPool as Pool; use buffer_sv2::{Buffer, Slice}; diff --git a/utils/buffer/fuzz/fuzz_targets/slower.rs b/utils/buffer/fuzz/fuzz_targets/slower.rs index 2a7eb29913..dfa84ee096 100644 --- a/utils/buffer/fuzz/fuzz_targets/slower.rs +++ b/utils/buffer/fuzz/fuzz_targets/slower.rs @@ -1,4 +1,5 @@ #![no_main] +#![deny(missing_docs)] use affinity::{get_core_num, set_thread_affinity}; use arbitrary::Arbitrary; use buffer_sv2::BufferPool as Pool; diff --git a/utils/buffer/src/buffer.rs b/utils/buffer/src/buffer.rs index f4b0dab504..205746cb1c 100644 --- a/utils/buffer/src/buffer.rs +++ b/utils/buffer/src/buffer.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::Buffer; use aes_gcm::aead::Buffer as AeadBuffer; use alloc::vec::Vec; diff --git a/utils/buffer/src/buffer_pool/mod.rs b/utils/buffer/src/buffer_pool/mod.rs index 705facfd8a..60eae207eb 100644 --- a/utils/buffer/src/buffer_pool/mod.rs +++ b/utils/buffer/src/buffer_pool/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use alloc::{vec, vec::Vec}; use core::sync::atomic::Ordering; diff --git a/utils/buffer/src/buffer_pool/pool_back.rs b/utils/buffer/src/buffer_pool/pool_back.rs index ad89bf1696..5751744ec2 100644 --- a/utils/buffer/src/buffer_pool/pool_back.rs +++ b/utils/buffer/src/buffer_pool/pool_back.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::buffer_pool::{InnerMemory, PoolFront, PoolMode, POOL_CAPACITY}; #[derive(Debug, Clone)] diff --git a/utils/buffer/src/lib.rs b/utils/buffer/src/lib.rs index 11d1eb0d13..ee55a56788 100644 --- a/utils/buffer/src/lib.rs +++ b/utils/buffer/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(not(feature = "debug"), no_std)] +#![deny(missing_docs)] //#![feature(backtrace)] mod buffer; diff --git a/utils/buffer/src/slice.rs b/utils/buffer/src/slice.rs index b36c6ee1d8..3891035af3 100644 --- a/utils/buffer/src/slice.rs +++ b/utils/buffer/src/slice.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use alloc::{sync::Arc, vec::Vec}; use core::sync::atomic::{AtomicU8, Ordering}; #[cfg(feature = "debug")] diff --git a/utils/buffer/src/test.rs b/utils/buffer/src/test.rs index b64cafc3c5..fdc4565287 100644 --- a/utils/buffer/src/test.rs +++ b/utils/buffer/src/test.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use alloc::vec::Vec; use crate::{buffer_pool::BufferPool as Pool, slice::Slice, Buffer}; diff --git a/utils/error-handling/src/lib.rs b/utils/error-handling/src/lib.rs index 96214d78aa..c8acd888ce 100644 --- a/utils/error-handling/src/lib.rs +++ b/utils/error-handling/src/lib.rs @@ -1,4 +1,5 @@ #![allow(clippy::crate_in_macro_def)] +#![deny(missing_docs)] /// # Description /// This macro handles errors inserting error handling logic for a given `Result>` it is used by passing in a `Sender` as the diff --git a/utils/key-utils/src/lib.rs b/utils/key-utils/src/lib.rs index 9643b060bd..d1c2ad9145 100644 --- a/utils/key-utils/src/lib.rs +++ b/utils/key-utils/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use bs58::{decode, decode::Error as Bs58DecodeError}; use core::convert::TryFrom; use secp256k1::{ diff --git a/utils/key-utils/src/main.rs b/utils/key-utils/src/main.rs index ffdc121c76..66d2c979a5 100644 --- a/utils/key-utils/src/main.rs +++ b/utils/key-utils/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use ::key_utils::{Secp256k1PublicKey, Secp256k1SecretKey}; use secp256k1::{rand, Keypair, Secp256k1}; diff --git a/utils/message-generator/src/executor.rs b/utils/message-generator/src/executor.rs index 64123475c0..a8ac607d2d 100644 --- a/utils/message-generator/src/executor.rs +++ b/utils/message-generator/src/executor.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ external_commands::os_command, into_static::into_static, diff --git a/utils/message-generator/src/executor_sv1.rs b/utils/message-generator/src/executor_sv1.rs index 9da74c9343..ff663da74f 100644 --- a/utils/message-generator/src/executor_sv1.rs +++ b/utils/message-generator/src/executor_sv1.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{ external_commands::os_command, net::setup_as_sv1_downstream, Command, Sv1Action, Sv1ActionResult, Test, diff --git a/utils/message-generator/src/external_commands.rs b/utils/message-generator/src/external_commands.rs index f0171c207d..4b305551f0 100644 --- a/utils/message-generator/src/external_commands.rs +++ b/utils/message-generator/src/external_commands.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use binary_sv2::{Deserialize, Serialize}; use std::{process::Stdio, time::Duration}; use tokio::{ diff --git a/utils/message-generator/src/into_static.rs b/utils/message-generator/src/into_static.rs index fb20c5f739..be6183a01b 100644 --- a/utils/message-generator/src/into_static.rs +++ b/utils/message-generator/src/into_static.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use roles_logic_sv2::{ common_messages_sv2::{ ChannelEndpointChanged, SetupConnection, SetupConnectionError, SetupConnectionSuccess, diff --git a/utils/message-generator/src/main.rs b/utils/message-generator/src/main.rs index 174aded2cc..4077cc5bef 100644 --- a/utils/message-generator/src/main.rs +++ b/utils/message-generator/src/main.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] mod executor; mod executor_sv1; mod external_commands; diff --git a/utils/message-generator/src/net.rs b/utils/message-generator/src/net.rs index 8893a9bd5b..ca06264e5e 100644 --- a/utils/message-generator/src/net.rs +++ b/utils/message-generator/src/net.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{os_command, Command}; use async_channel::{bounded, Receiver, Sender}; use binary_sv2::{Deserialize, GetSize, Serialize}; diff --git a/utils/message-generator/src/parser/actions.rs b/utils/message-generator/src/parser/actions.rs index 23bf6188be..8b609728af 100644 --- a/utils/message-generator/src/parser/actions.rs +++ b/utils/message-generator/src/parser/actions.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use crate::{Action, ActionResult, Role, SaveField, Sv1Action, Sv1ActionResult, Sv2Type}; use codec_sv2::{buffer_sv2::Slice, StandardEitherFrame, Sv2Frame}; use roles_logic_sv2::parsers::AnyMessage; diff --git a/utils/message-generator/src/parser/frames.rs b/utils/message-generator/src/parser/frames.rs index b612415071..8f3fdcadb3 100644 --- a/utils/message-generator/src/parser/frames.rs +++ b/utils/message-generator/src/parser/frames.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use super::sv2_messages::{message_from_path, ReplaceField}; use codec_sv2::{buffer_sv2::Slice, Sv2Frame}; use roles_logic_sv2::parsers::AnyMessage; diff --git a/utils/message-generator/src/parser/mod.rs b/utils/message-generator/src/parser/mod.rs index 9d5a05cfde..bceba44fbc 100644 --- a/utils/message-generator/src/parser/mod.rs +++ b/utils/message-generator/src/parser/mod.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] mod actions; mod frames; pub mod sv1_messages; diff --git a/utils/message-generator/src/parser/sv1_messages.rs b/utils/message-generator/src/parser/sv1_messages.rs index c80f15950a..5d797886d6 100644 --- a/utils/message-generator/src/parser/sv1_messages.rs +++ b/utils/message-generator/src/parser/sv1_messages.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use serde::{Deserialize, Serialize}; use std::collections::HashMap; use v1::json_rpc::*; diff --git a/utils/message-generator/src/parser/sv2_messages.rs b/utils/message-generator/src/parser/sv2_messages.rs index e60f15e0be..d4f7ac8541 100644 --- a/utils/message-generator/src/parser/sv2_messages.rs +++ b/utils/message-generator/src/parser/sv2_messages.rs @@ -1,3 +1,4 @@ +#![deny(missing_docs)] use binary_sv2::{Deserialize, Serialize}; use roles_logic_sv2::{ common_messages_sv2::{SetupConnectionError, SetupConnectionSuccess}, From ec9eb50bd55d9f9873941001d1c89ae39c6755a2 Mon Sep 17 00:00:00 2001 From: plebhash Date: Thu, 5 Dec 2024 17:25:04 +0700 Subject: [PATCH 2/2] enforce missing_docs macro in CI --- .github/workflows/rust-docs.yaml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/rust-docs.yaml diff --git a/.github/workflows/rust-docs.yaml b/.github/workflows/rust-docs.yaml new file mode 100644 index 0000000000..b47d7bc68b --- /dev/null +++ b/.github/workflows/rust-docs.yaml @@ -0,0 +1,35 @@ +name: Validate Rust Docs + +on: + push: + branches: + - main + pull_request: + +jobs: + generate-docs: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Find and Document All Crates + run: | + # Fail on any error + set -e + + # Find all Cargo.toml files (crates) and run `cargo doc` for each + find . -name "Cargo.toml" | while read -r crate; do + crate_dir=$(dirname "$crate") + echo "Generating documentation for $crate_dir..." + ( + cd "$crate_dir" || exit 1 + cargo doc --all-features --no-deps + ) + done \ No newline at end of file