Skip to content

Commit

Permalink
doc: fix doc generation warnings + couple nomicon.io broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Dec 2, 2024
1 parent e82ffcc commit f42ad33
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions near-contract-standards/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#![allow(clippy::missing_const_for_fn, clippy::redundant_pub_crate)]
#![allow(clippy::needless_lifetimes)]

/// Fungible tokens as described in [by the spec](https://nomicon.io/Standards/FungibleToken/README.html).
/// Fungible tokens as described in [by the spec](https://nomicon.io/Standards/Tokens/FungibleToken).
pub mod fungible_token;
/// Non-fungible tokens as described in [by the spec](https://nomicon.io/Standards/NonFungibleToken/README.html).
/// Non-fungible tokens as described in [by the spec](https://nomicon.io/Standards/Tokens/NonFungibleToken).
pub mod non_fungible_token;
/// Storage management deals with handling [state storage](https://docs.near.org/docs/concepts/storage-staking) on NEAR. This follows the [storage management standard](https://nomicon.io/Standards/StorageManagement.html).
pub mod storage_management;
Expand Down
6 changes: 3 additions & 3 deletions near-sdk/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//! If your collection has up to 100 entries, it's acceptable to use the native collection, as it might be simpler
//! since you don't have to manage prefixes as we do with near collections.
//! However, if your collection has 1,000 or more entries, it's better to use a near collection. The investigation
//! mentioned above shows that running the contains method on a native HashSet<i32> consumes 41% more gas
//! compared to a near IterableSet<i32>.
//! mentioned above shows that running the contains method on a native [`std::collections::HashSet<i32>`] consumes 41% more gas
//! compared to a near [`crate::store::IterableSet<i32>`].
//!
//! It's also a bad practice to have a native collection properties as a top level properties of your contract.
//! The contract will load all the properties before the contract method invocation. That means that all your native
Expand Down Expand Up @@ -52,7 +52,7 @@
//! - [`UnorderedMap`]: Storage version of [`std::collections::HashMap`]. No ordering
//! guarantees.
//!
//! - [`TreeMap`](TreeMap) (`unstable`): Storage version of [`std::collections::BTreeMap`]. Ordered by key,
//! - [`TreeMap`] (`unstable`): Storage version of [`std::collections::BTreeMap`]. Ordered by key,
//! which comes at the cost of more expensive lookups and iteration.
//!
//! Sets:
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/test_utils/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub struct VMContext {
pub random_seed: [u8; 32],
/// If Some, it means that execution is made in a view mode and defines its configuration.
/// View mode means that only read-only operations are allowed.
/// See <https://nomicon.io/Proposals/0018-view-change-method.html> for more details.
/// See <https://nomicon.io/Proposals/view-change-method> for more details.
pub view_config: Option<ViewConfig>,
/// How many `DataReceipt`'s should receive this execution result. This should be empty if
/// this function call is a part of a batch and it is not the last action.
Expand Down
4 changes: 2 additions & 2 deletions near-sdk/src/test_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub use context::{accounts, testing_env_with_promise_results, VMContextBuilder};
/// about the VM to configure parameters not directly related to the transaction being executed.
/// - `fee_config`(optional): [`RuntimeFeesConfig`] which configures the
/// fees for execution and storage of transactions.
/// - `validators`(optional): a [`HashMap`]<[`AccountId`], [`Balance`]> mocking the
/// - `validators`(optional): a [`HashMap`]<[`AccountId`], [`NearToken`]> mocking the
/// current validators of the blockchain.
/// - `promise_results`(optional): a [`Vec`] of [`PromiseResult`] which mocks the results
/// of callback calls during the execution.
Expand Down Expand Up @@ -57,7 +57,7 @@ pub use context::{accounts, testing_env_with_promise_results, VMContextBuilder};
/// [`vm::Config`]: near_parameters::vm::Config
/// [`RuntimeFeesConfig`]: near_parameters::RuntimeFeesConfig
/// [`AccountId`]: crate::AccountId
/// [`Balance`]: crate::Balance
/// [`NearToken`]: crate::NearToken
/// [`PromiseResult`]: crate::PromiseResult
/// [`HashMap`]: std::collections::HashMap
#[macro_export]
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/src/test_utils/test_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn setup() {
}

/// free == effectively unlimited gas
/// Sets up the blockchain interface with a [`VMConfig`] which sets the gas costs to zero.
/// Sets up the blockchain interface with a [`near_parameters::vm::Config`] which sets the gas costs to zero.
pub fn setup_free() {
let mut config = test_vm_config();
config.make_free();
Expand Down

0 comments on commit f42ad33

Please sign in to comment.