Skip to content

Commit 6169c11

Browse files
committed
Fix rebase
1 parent d415a19 commit 6169c11

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

sdk/pinocchio/src/lib.rs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
//! # Pinocchio
22
//!
3-
//! Pinocchio is a zero-dependency library to create Solana programs in Rust.
4-
//! It takes advantage of the way SVM loaders serialize the program input parameters
5-
//! into a byte array that is then passed to the program's entrypoint to define
6-
//! zero-copy types to read the input - these types are defined in an efficient way
7-
//! taking into consideration that they will be used in on-chain programs.
3+
//! Pinocchio is a "no-external" dependencies library to create Solana programs
4+
//! in Rust, which means that the only dependencies are from the Solana SDK. This
5+
//! reduces the chance of dependency conflicts when compiling the program.
6+
//!
7+
//! It takes advantage of the way SVM loaders serialize the program input
8+
//! parameters into a byte array that is then passed to the program's entrypoint
9+
//! to use zero-copy types to read the input - these types are defined in an efficient
10+
//! way taking into consideration that they will be used in on-chain programs.
811
//!
912
//! It is intended to be used by on-chain programs only; for off-chain programs,
10-
//! use instead the [`solana-sdk`] crate.
13+
//! use instead [`solana-sdk`] crates.
1114
//!
1215
//! [`solana-sdk`]: https://docs.rs/solana-sdk/latest/solana_sdk/
1316
//!
@@ -31,10 +34,10 @@
3134
//! ```ignore
3235
//! use pinocchio::{
3336
//! AccountView,
37+
//! Address,
3438
//! entrypoint,
3539
//! msg,
36-
//! ProgramResult,
37-
//! Address
40+
//! ProgramResult
3841
//! };
3942
//!
4043
//! entrypoint!(process_instruction);
@@ -71,7 +74,7 @@
7174
//! ### [`lazy_program_entrypoint!`]
7275
//!
7376
//! The [`entrypoint!`] macro looks similar to the "standard" one found in
74-
//! [`solana-program`](https://docs.rs/solana-program-entrypoint/latest/solana_program_entrypoint/macro.entrypoint.html).
77+
//! [`solana-program-entrypoint`](https://docs.rs/solana-program-entrypoint/latest/solana_program_entrypoint/macro.entrypoint.html).
7578
//! It parses the whole input and provides the `program_id`, `accounts` and
7679
//! `instruction_data` separately. This consumes compute units before the program
7780
//! begins its execution. In some cases, it is beneficial for a program to have
@@ -137,12 +140,12 @@
137140
//! ```ignore
138141
//! use pinocchio::{
139142
//! AccountView,
143+
//! Address,
140144
//! default_panic_handler,
141145
//! msg,
142146
//! no_allocator,
143147
//! program_entrypoint,
144-
//! ProgramResult,
145-
//! Address
148+
//! ProgramResult
146149
//! };
147150
//!
148151
//! program_entrypoint!(process_instruction);
@@ -194,10 +197,10 @@
194197
//! mod entrypoint {
195198
//! use pinocchio::{
196199
//! AccountView,
200+
//! Address,
197201
//! entrypoint,
198202
//! msg,
199-
//! ProgramResult,
200-
//! Address
203+
//! ProgramResult
201204
//! };
202205
//!
203206
//! entrypoint!(process_instruction);

sdk/pinocchio/src/sysvars/instructions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl IntrospectedAccountRole {
244244

245245
/// Convert the `IntrospectedAccountRole` to an `AccountRole`.
246246
#[inline(always)]
247-
pub fn to_account_meta(&self) -> AccountRole {
247+
pub fn to_account_role(&self) -> AccountRole {
248248
AccountRole::new(&self.key, self.is_writable(), self.is_signer())
249249
}
250250
}

0 commit comments

Comments
 (0)