Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues #2834

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/src/rust_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ impl TestTemplate {
}
}
Self::Rust => {
// Do not initilize git repo
// Do not initialize git repo
let exit = std::process::Command::new("cargo")
.arg("new")
.arg("--vcs")
Expand Down
2 changes: 1 addition & 1 deletion client/src/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ mod tests {
#[test]
#[should_panic]
fn test_cluster_bad_parse() {
let bad_url = "httq://my_custom_url.test.net";
let bad_url = "http://my_custom_url.test.net";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is deliberately a bad_url and designed to make the program panic. See test_cluster_bad_parse()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a 🤖

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol the bot author needs to make it write better PR titles - 'fix issues' 🤦🏼‍♂️

Cluster::from_str(bad_url).unwrap();
}

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The `program-name` is the name of the program where the account struct resides,

The `AccountTypeName` is the name of the account struct, usually in PascalCase.

The `account_pubkey` refers to the Pubkey of the account to deserialise, in Base58.
The `account_pubkey` refers to the Pubkey of the account to deserialize, in Base58.

Example Usage: `anchor account anchor-escrow.EscrowAccount 3PNkzWKXCsbjijbasnx55NEpJe8DFXvEEbJKdRKpDcfK`, deserializes an account in the given pubkey with the account struct `EscrowAccount` defined in the `anchor-escrow` program.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/docs/the-accounts-struct.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ You can find information about all constraints in the reference. We will cover s

## Safety checks

Two of the Anchor account types, [AccountInfo](https://docs.rs/anchor-lang/latest/anchor_lang/accounts/account_info/index.html) and [UncheckedAccount](https://docs.rs/anchor-lang/latest/anchor_lang/accounts/unchecked_account/index.html) do not implement any checks on the account being passed. Anchor implements safety checks that encourage additional documentation describing why additional checks are not necesssary.
Two of the Anchor account types, [AccountInfo](https://docs.rs/anchor-lang/latest/anchor_lang/accounts/account_info/index.html) and [UncheckedAccount](https://docs.rs/anchor-lang/latest/anchor_lang/accounts/unchecked_account/index.html) do not implement any checks on the account being passed. Anchor implements safety checks that encourage additional documentation describing why additional checks are not necessary.

Attempting to build a program containing the following excerpt with `anchor build`:

Expand Down
2 changes: 1 addition & 1 deletion lang/syn/src/codegen/program/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub const SIGHASH_GLOBAL_NAMESPACE: &str = "global";

// We don't technically use sighash, because the input arguments aren't given.
// Rust doesn't have method overloading so no need to use the arguments.
// However, we do namespace methods in the preeimage so that we can use
// However, we do namespace methods in the preimage so that we can use
// different traits with the same method name.
pub fn sighash(namespace: &str, name: &str) -> [u8; 8] {
let preimage = format!("{namespace}:{name}");
Expand Down
2 changes: 1 addition & 1 deletion lang/syn/src/codegen/program/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn generate(program: &Program) -> proc_macro2::TokenStream {
///
/// Each method in an anchor program is uniquely defined by a namespace
/// and a rust identifier (i.e., the name given to the method). These
/// two pieces can be combined to creater a method identifier,
/// two pieces can be combined to create a method identifier,
/// specifically, Anchor uses
///
/// Sha256("<namespace>:<rust-identifier>")[..8],
Expand Down
2 changes: 1 addition & 1 deletion ts/packages/anchor/src/coder/borsh/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class BorshAccountsCoder<A extends string = string>
private accountLayouts: Map<A, Layout>;

/**
* IDL whose acconts will be coded.
* IDL whose accounts will be coded.
*/
private idl: Idl;

Expand Down
4 changes: 2 additions & 2 deletions ts/packages/anchor/src/program/accounts-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ export class AccountsResolver<IDL extends Idl> {
return accountField;
}

// Converts the given idl valaue into a Buffer. The values here must be
// Converts the given idl value into a Buffer. The values here must be
// primitives. E.g. no structs.
//
// TODO: add more types here as needed.
Expand Down Expand Up @@ -558,7 +558,7 @@ export class AccountsResolver<IDL extends Idl> {
}
}

// TODO: this should be configureable to avoid unnecessary requests.
// TODO: this should be configurable to avoid unnecessary requests.
export class AccountStore<IDL extends Idl> {
private _cache = new Map<string, any>();
private _idls: Record<string, AccountNamespace<any>> = {};
Expand Down
2 changes: 1 addition & 1 deletion ts/packages/spl-token/program/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ pub enum TokenError {
#[msg("Invalid number of required signers")]
InvalidNumberOfRequiredSigners,
/// State is uninitialized.
#[msg("State is unititialized")]
#[msg("State is uninitialized")]
UninitializedState,

// 10
Expand Down