Selaa lähdekoodia

fix: various importance typos (#7342)

* Update read_only_accounts_cache.rs

* Update tests.rs

* Update memory.rs

* Update byte_block.rs
Gengar 3 kuukautta sitten
vanhempi
sitoutus
a2c44d61d7

+ 1 - 1
accounts-db/benches/read_only_accounts_cache.rs

@@ -164,7 +164,7 @@ fn bench_read_only_accounts_cache_eviction(
     max_data_size_hi: usize,
     max_data_size_hi: usize,
 ) {
 ) {
     // Prepare initial accounts, two times the high limit of the cache, to make
     // Prepare initial accounts, two times the high limit of the cache, to make
-    // sure that the backgroud threads sometimes try to store something which
+    // sure that the background threads sometimes try to store something which
     // is not in the cache.
     // is not in the cache.
     let accounts: Vec<_> = utils::accounts_with_size_limit(
     let accounts: Vec<_> = utils::accounts_with_size_limit(
         255,
         255,

+ 1 - 1
accounts-db/src/accounts_db/tests.rs

@@ -4282,7 +4282,7 @@ fn start_load_thread(
                     return;
                     return;
                 }
                 }
                 // Meddle load_limit to cover all branches of implementation.
                 // Meddle load_limit to cover all branches of implementation.
-                // There should absolutely no behaviorial difference; the load_limit triggered
+                // There should absolutely no behavioral difference; the load_limit triggered
                 // slow branch should only affect the performance.
                 // slow branch should only affect the performance.
                 // Ordering::Relaxed is ok because of no data dependencies; the modified field is
                 // Ordering::Relaxed is ok because of no data dependencies; the modified field is
                 // completely free-standing cfg(test) control-flow knob.
                 // completely free-standing cfg(test) control-flow knob.

+ 2 - 2
accounts-db/src/io_uring/memory.rs

@@ -49,7 +49,7 @@ impl AsMut<[u8]> for LargeBuffer {
 }
 }
 
 
 impl LargeBuffer {
 impl LargeBuffer {
-    /// Allocare memory buffer optimized for io_uring operations, i.e.
+    /// Allocate memory buffer optimized for io_uring operations, i.e.
     /// using HugeTable when it is available on the host.
     /// using HugeTable when it is available on the host.
     pub fn new(size: usize) -> Self {
     pub fn new(size: usize) -> Self {
         if size > PageAlignedMemory::page_size() {
         if size > PageAlignedMemory::page_size() {
@@ -198,7 +198,7 @@ impl FixedIoBuffer {
         }
         }
     }
     }
 
 
-    /// Registed provided buffer as fixed buffer in `io_uring`.
+    /// Register provided buffer as fixed buffer in `io_uring`.
     pub unsafe fn register<S, E: RingOp<S>>(
     pub unsafe fn register<S, E: RingOp<S>>(
         buffer: &mut [u8],
         buffer: &mut [u8],
         ring: &Ring<S, E>,
         ring: &Ring<S, E>,

+ 1 - 1
accounts-db/src/tiered_storage/byte_block.rs

@@ -391,7 +391,7 @@ mod tests {
     }
     }
 
 
     #[test]
     #[test]
-    fn test_write_optionl_fields_raw_format() {
+    fn test_write_optional_fields_raw_format() {
         write_optional_fields(AccountBlockFormat::AlignedRaw);
         write_optional_fields(AccountBlockFormat::AlignedRaw);
     }
     }