Repository: solana-labs/solana-program-library
Pull request #6588 (2024-04-17 03:39:48)

chore: fix some comments


Patch:
diff --git a/single-pool/cli/src/cli.rs b/single-pool/cli/src/cli.rs
index 244c4777a..ae6351fc0 100644
--- a/single-pool/cli/src/cli.rs
+++ b/single-pool/cli/src/cli.rs
@@ -318,7 +318,7 @@ fn pool_source_group() -> ArgGroup<'static> {
 pub fn parse_address(path: &str, name: &str) -> Result<Pubkey, String> {
     if is_valid_pubkey(path).is_ok() {
         // this all is ugly but safe
-        // wallet_manager doesnt need to be shared, it just saves cycles to cache it
+        // wallet_manager doesn't need to be shared, it just saves cycles to cache it
         // and the only way argmatches default fails with an unchecked lookup is in the
         // prompt branch which seems unlikely to ever be used for pubkeys
         // the usb lookup in signer_from_path_with_config is safe
diff --git a/token/cli/src/command.rs b/token/cli/src/command.rs
index 06ec2d4a2..8c8097589 100644
--- a/token/cli/src/command.rs
+++ b/token/cli/src/command.rs
@@ -888,7 +888,7 @@ async fn command_create_multisig(
         ),
     );
 
-    // default is safe here because create_multisig doesnt use it
+    // default is safe here because create_multisig doesn't use it
     let token = token_client_from_config(config, &Pubkey::default(), None)?;
 
     let res = token
@@ -1127,7 +1127,7 @@ async fn command_authorize(
 
         (mint_pubkey, previous_authority)
     } else {
-        // default is safe here because authorize doesnt use it
+        // default is safe here because authorize doesn't use it
         (Pubkey::default(), None)
     };
 
@@ -1347,7 +1347,7 @@ async fn command_transfer(
                                      Add `--allow-non-system-account-recipient` to complete the transfer.".into());
             }
         }
-        // if it doesnt exist, it definitely isnt a token account!
+        // if it doesn't exist, it definitely isnt a token account!
         // we gate transfer with a different flag
         else if maybe_recipient_account_data.is_none() && allow_unfunded_recipient {
             false
@@ -2047,7 +2047,7 @@ async fn command_revoke(
 
         (source_state.base.mint, delegate)
     } else {
-        // default is safe here because revoke doesnt use it
+        // default is safe here because revoke doesn't use it
         (Pubkey::default(), delegate)
     };
 
@@ -2118,7 +2118,7 @@ async fn command_close(
 
         token
     } else {
-        // default is safe here because close doesnt use it
+        // default is safe here because close doesn't use it
         token_client_from_config(config, &Pubkey::default(), None)?
     };
 


Test patch:
diff --git a/single-pool/program/tests/helpers/mod.rs b/single-pool/program/tests/helpers/mod.rs
index 083d9f6f0..1cceb1463 100644
--- a/single-pool/program/tests/helpers/mod.rs
+++ b/single-pool/program/tests/helpers/mod.rs
@@ -1,4 +1,4 @@
-#![allow(dead_code)] // needed because cargo doesnt understand test usage
+#![allow(dead_code)] // needed because cargo doesn't understand test usage
 
 use {
     solana_program_test::*,
diff --git a/single-pool/program/tests/helpers/stake.rs b/single-pool/program/tests/helpers/stake.rs
index 18979ae66..73047eeb3 100644
--- a/single-pool/program/tests/helpers/stake.rs
+++ b/single-pool/program/tests/helpers/stake.rs
@@ -1,4 +1,4 @@
-#![allow(dead_code)] // needed because cargo doesnt understand test usage
+#![allow(dead_code)] // needed because cargo doesn't understand test usage
 
 use {
     crate::get_account,
diff --git a/token/program-2022-test/tests/cpi_guard.rs b/token/program-2022-test/tests/cpi_guard.rs
index 74da17275..9c278f145 100644
--- a/token/program-2022-test/tests/cpi_guard.rs
+++ b/token/program-2022-test/tests/cpi_guard.rs
@@ -270,7 +270,7 @@ async fn test_cpi_guard_transfer() {
         let alice_state = token_obj.get_account_info(&alice.pubkey()).await.unwrap();
         assert_eq!(alice_state.base.amount, amount);
 
-        // user-auth cpi transfer with cpi guard doesnt work
+        // user-auth cpi transfer with cpi guard doesn't work
         let error = token_obj
             .process_ixs(&[mk_transfer(alice.pubkey(), do_checked)], &[&alice])
             .await
@@ -389,7 +389,7 @@ async fn test_cpi_guard_burn() {
         let alice_state = token_obj.get_account_info(&alice.pubkey()).await.unwrap();
         assert_eq!(alice_state.base.amount, amount);
 
-        // user-auth cpi burn with cpi guard doesnt work
+        // user-auth cpi burn with cpi guard doesn't work
         let error = token_obj
             .process_ixs(&[mk_burn(alice.pubkey(), do_checked)], &[&alice])
             .await
@@ -504,7 +504,7 @@ async fn test_cpi_guard_approve() {
             .await
             .unwrap();
 
-        // approve doesnt work through cpi
+        // approve doesn't work through cpi
         let error = token_obj
             .process_ixs(&[mk_approve(do_checked)], &[&alice])
             .await
@@ -737,7 +737,7 @@ async fn test_cpi_guard_set_authority() {
         )
         .unwrap();
 
-        // this wraps it or doesnt based on the test case
+        // this wraps it or doesn't based on the test case
         let instruction = if do_in_cpi {
             wrap_instruction(spl_instruction_padding::id(), token_instruction, vec![], 0).unwrap()
         } else {