Skip to content

Commit

Permalink
Fix cargo doc, check for cargo doc in the CI (#1601)
Browse files Browse the repository at this point in the history
Co-authored-by: Green Baneling <XgreenX9999@gmail.com>
  • Loading branch information
Dentosal and xgreenx committed Jan 17, 2024
1 parent bf1b22f commit 622e38b
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ jobs:
args: --all-targets --all-features
- command: check
args: --all-targets
- command: doc
args: --all-features --workspace
- command: make
args: check --locked
- command: test
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Description of the upcoming release here.
- [#1591](https://github.com/FuelLabs/fuel-core/pull/1591): Simplify libp2p dependencies and not depend on all sub modules directly.
- [#1585](https://github.com/FuelLabs/fuel-core/pull/1585): Let `NetworkBehaviour` macro generate `FuelBehaviorEvent` in p2p
- [#1577](https://github.com/FuelLabs/fuel-core/pull/1577): Moved insertion of sealed blocks into the `BlockImporter` instead of the executor.
- [#1601](https://github.com/FuelLabs/fuel-core/pull/1601): Fix formatting in docs and check that `cargo doc` passes in the CI.

#### Breaking
- [#1593](https://github.com/FuelLabs/fuel-core/pull/1593) Make `Block` type a version-able enum
Expand Down
2 changes: 1 addition & 1 deletion bin/e2e-test-client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct SuiteConfig {
/// The primary endpoint to connect to
pub endpoint: String,
/// Max timeout for syncing between wallets
/// Default is [`SYNC_TIMEOUT`](crate::SYNC_TIMEOUT)
/// Default is [`SYNC_TIMEOUT`]
#[serde(with = "humantime_serde")]
pub wallet_sync_timeout: Duration,
/// Enable slower but more stressful tests. Should be used in full E2E tests but not in CI.
Expand Down
2 changes: 1 addition & 1 deletion crates/fuel-core/src/coins_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl SpendQuery {
})
}

/// Return [`Asset`]s.
/// Return `Asset`s.
pub fn assets(&self) -> &Vec<AssetSpendTarget> {
&self.query_per_asset
}
Expand Down
2 changes: 1 addition & 1 deletion crates/fuel-core/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub enum Column {
ContractsStateMerkleData = 23,
/// See [`ContractsStateMerkleMetadata`](storage::ContractsStateMerkleMetadata)
ContractsStateMerkleMetadata = 24,
/// See [`ProcessedTransactions`](storage::ProcessedTransactions)
/// See [`ProcessedTransactions`](fuel_core_storage::tables::ProcessedTransactions)
ProcessedTransactions = 25,
}

Expand Down
6 changes: 3 additions & 3 deletions crates/fuel-core/src/database/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl Mappable for FuelBlockMerkleData {
type OwnedValue = Self::Value;
}

/// The metadata table for [`FuelBlockMerkleData`](FuelBlockMerkleData) table.
/// The metadata table for [`FuelBlockMerkleData`] table.
pub struct FuelBlockMerkleMetadata;

impl Mappable for FuelBlockMerkleMetadata {
Expand All @@ -113,7 +113,7 @@ impl Mappable for ContractsAssetsMerkleData {
type OwnedValue = Self::Value;
}

/// The metadata table for [`ContractsAssetsMerkleData`](ContractsAssetsMerkleData) table
/// The metadata table for [`ContractsAssetsMerkleData`] table
pub struct ContractsAssetsMerkleMetadata;

impl Mappable for ContractsAssetsMerkleMetadata {
Expand All @@ -133,7 +133,7 @@ impl Mappable for ContractsStateMerkleData {
type OwnedValue = Self::Value;
}

/// The metadata table for [`ContractsStateMerkleData`](ContractsStateMerkleData) table
/// The metadata table for [`ContractsStateMerkleData`] table
pub struct ContractsStateMerkleMetadata;

impl Mappable for ContractsStateMerkleMetadata {
Expand Down
2 changes: 1 addition & 1 deletion crates/fuel-core/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl FuelService {
}

#[cfg(feature = "relayer")]
/// Wait for the [`Relayer`] to be in sync with
/// Wait for the Relayer to be in sync with
/// the data availability layer.
///
/// Yields until the relayer reaches a point where it
Expand Down
2 changes: 1 addition & 1 deletion crates/services/p2p/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub struct Config<State = Initialized> {
/// Name of the Network
pub network_name: String,

/// Checksum is a hash(sha256) of [`Genesis`](fuel_core_types::blockchain::consensus::Genesis) - chain id.
/// Checksum is a hash(sha256) of [`Genesis`] - chain id.
pub checksum: Checksum,

/// IP address for Swarm to listen on
Expand Down
2 changes: 1 addition & 1 deletion crates/services/p2p/src/gossipsub/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub enum GossipTopicTag {
NewTx,
}

/// Takes Arc<T> and wraps it in a matching GossipsubBroadcastRequest
/// Takes `Arc<T>` and wraps it in a matching GossipsubBroadcastRequest
/// The inner referenced value is serialized and broadcast to the network
/// It is deserialized as `GossipsubMessage`
#[derive(Debug, Clone)]
Expand Down
2 changes: 1 addition & 1 deletion crates/services/p2p/src/p2p_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub struct FuelP2PService {
/// It will send it to the specified Peer via its unique ResponseChannel
inbound_requests_table: HashMap<InboundRequestId, ResponseChannel<ResponseMessage>>,

/// NetworkCodec used as <GossipsubCodec> for encoding and decoding of Gossipsub messages
/// NetworkCodec used as `<GossipsubCodec>` for encoding and decoding of Gossipsub messages
network_codec: PostcardCodec,

/// Stores additional p2p network info
Expand Down
2 changes: 1 addition & 1 deletion crates/services/relayer/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ where
}

impl<D> SharedState<D> {
/// Wait for the [`Task`] to be in sync with
/// Wait for the `Task` to be in sync with
/// the data availability layer.
///
/// Yields until the relayer reaches a point where it
Expand Down
2 changes: 1 addition & 1 deletion crates/services/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use futures::FutureExt;
use tokio::sync::watch;
use tracing::Instrument;

/// Alias for Arc<T>
/// Alias for `Arc<T>`
pub type Shared<T> = std::sync::Arc<T>;

/// A mutex that can safely be in async contexts and avoids deadlocks.
Expand Down
7 changes: 3 additions & 4 deletions crates/storage/src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ impl Mappable for SealedBlockConsensus {
type OwnedValue = Consensus;
}

/// The storage table of coins. Each
/// [`CompressedCoin`](fuel_core_types::entities::coins::coin::CompressedCoin)
/// The storage table of coins. Each [`CompressedCoin`]
/// is represented by unique `UtxoId`.
pub struct Coins;

Expand All @@ -91,7 +90,7 @@ impl Mappable for Coins {
type OwnedValue = CompressedCoin;
}

/// The storage table of bridged Ethereum [`Message`](crate::model::Message)s.
/// The storage table of bridged Ethereum message.
pub struct Messages;

impl Mappable for Messages {
Expand All @@ -101,7 +100,7 @@ impl Mappable for Messages {
type OwnedValue = Message;
}

/// The storage table that indicates if the [`Message`](crate::model::Message) is spent or not.
/// The storage table that indicates if the message is spent or not.
pub struct SpentMessages;

impl Mappable for SpentMessages {
Expand Down
2 changes: 1 addition & 1 deletion crates/types/src/blockchain/consensus/poa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::fuel_crypto::Signature;
/// The consensus related data that doesn't live on the
/// header.
pub struct PoAConsensus {
/// The signature of the [`FuelBlockHeader`].
/// The signature of the `FuelBlockHeader`.
pub signature: Signature,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/types/src/blockchain/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub struct ApplicationHeader<Generated> {
/// to have some rules in place to ensure the block number was chosen in a reasonable way. For
/// example, they should verify that the block number satisfies the finality requirements of the
/// layer 1 chain. They should also verify that the block number isn't too stale and is increasing.
/// Some similar concerns are noted in this issue: https://github.com/FuelLabs/fuel-specs/issues/220
/// Some similar concerns are noted in this issue: <https://github.com/FuelLabs/fuel-specs/issues/220>
pub da_height: DaBlockHeight,
/// Generated application fields.
pub generated: Generated,
Expand Down
4 changes: 2 additions & 2 deletions crates/types/src/services/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ pub enum ExecutionTypes<P, V> {
}

/// Starting point for executing a block. Production starts with a [`PartialFuelBlock`].
/// Validation starts with a full [`FuelBlock`].
/// Validation starts with a full `FuelBlock`.
pub type ExecutionBlock = ExecutionTypes<PartialFuelBlock, Block>;

impl<P> ExecutionTypes<P, Block> {
/// Get the hash of the full [`FuelBlock`] if validating.
/// Get the hash of the full `FuelBlock` if validating.
pub fn id(&self) -> Option<BlockId> {
match self {
ExecutionTypes::DryRun(_) => None,
Expand Down
2 changes: 1 addition & 1 deletion crates/types/src/services/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl FromStr for PeerId {

impl PeerId {
/// Bind the PeerId and given data of type T together to generate a
/// SourcePeer<T>
/// `SourcePeer<T>`
pub fn bind<T>(self, data: T) -> SourcePeer<T> {
SourcePeer {
peer_id: self,
Expand Down

0 comments on commit 622e38b

Please sign in to comment.