Skip to content

Commit

Permalink
docs test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyProgrammist committed Dec 20, 2024
1 parent 49bc57b commit f29575c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
env:
RUSTDOCFLAGS: -D warnings
run: |
cargo doc -p near-sdk --features unstable,legacy,unit-testing,__macro-docs
cargo doc -p near-sdk --features unstable,legacy,unit-testing,__macro-docs,near-primitives,near-vm-runner
cargo doc -p near-sdk-macros
cargo doc -p near-contract-standards --no-deps
cargo doc -p near-sys
8 changes: 4 additions & 4 deletions near-sdk-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct NearMacroArgs {
/// impl Adder {
/// #[result_serializer(borsh)]
/// pub fn borsh_parameters(&self, #[serializer(borsh)] a: Pair, #[serializer(borsh)] b: Pair) -> Pair {
/// ...
/// /// ...
// }
/// ```
///
Expand All @@ -81,7 +81,7 @@ struct NearMacroArgs {
/// impl Adder {
/// #[result_serializer(borsh)]
/// pub fn borsh_parameters(&self) -> Pair {
/// ...
/// /// ...
// }
/// ```
///
Expand Down Expand Up @@ -316,8 +316,8 @@ pub fn near(attr: TokenStream, item: TokenStream) -> TokenStream {
TokenStream::from(expanded)
}

/// This macro is deprecated. Use [#[near]](./attr.near.html) instead. The difference between #[near] and #[near_bindgen] is that
/// with #[near_bindgen] you have to manually add boilerplate code for structs and enums so that they become Json- and Borsh-serializable:
/// This macro is deprecated. Use [#[macro@near]](./attr.near.html) instead. The difference between #[macro@near] and #[macro@near_bindgen] is that
/// with #[macro@near_bindgen] you have to manually add boilerplate code for structs and enums so that they become Json- and Borsh-serializable:
/// ```ignore
/// #[near_bindgen]
/// #[derive(BorshSerialize, BorshDeserialize, NearSchema)]
Expand Down
2 changes: 2 additions & 0 deletions near-sdk/src/environment/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,7 @@ pub fn promise_batch_action_delete_account(
/// assert_eq!(promise_results_count(), 0);
/// ```
/// More low-level info here: [`near_vm_runner::logic::VMLogic::promise_results_count`]
/// See example of usage [here](https://github.com/near/near-sdk-rs/blob/master/examples/cross-contract-calls/low-level/src/lib.rs)
pub fn promise_results_count() -> u64 {
unsafe { sys::promise_results_count() }
}
Expand Down Expand Up @@ -1419,6 +1420,7 @@ pub fn promise_results_count() -> u64 {
/// };
/// ```
/// More low-level info here: [`near_vm_runner::logic::VMLogic::promise_result`]
/// Example usages: [one](https://github.com/near/near-sdk-rs/blob/189897180649bce47aefa4e5af03664ee525508d/near-contract-standards/src/fungible_token/core_impl.rs#L178), [two](https://github.com/near/near-sdk-rs/blob/189897180649bce47aefa4e5af03664ee525508d/near-contract-standards/src/non_fungible_token/core/core_impl.rs#L433), [three](https://github.com/near/near-sdk-rs/blob/189897180649bce47aefa4e5af03664ee525508d/examples/factory-contract/low-level/src/lib.rs#L61), [four](https://github.com/near/near-sdk-rs/blob/189897180649bce47aefa4e5af03664ee525508d/examples/cross-contract-calls/low-level/src/lib.rs#L46)
pub fn promise_result(result_idx: u64) -> PromiseResult {
match promise_result_internal(result_idx) {
Ok(()) => {
Expand Down

0 comments on commit f29575c

Please sign in to comment.