diff --git a/language/move-binary-format/src/check_bounds.rs b/language/move-binary-format/src/check_bounds.rs index c60fa080c5..8432342496 100644 --- a/language/move-binary-format/src/check_bounds.rs +++ b/language/move-binary-format/src/check_bounds.rs @@ -202,7 +202,7 @@ impl<'a> BoundsChecker<'a> { check_bounds_impl(self.view.identifiers(), function_handle.name)?; check_bounds_impl(self.view.signatures(), function_handle.parameters)?; check_bounds_impl(self.view.signatures(), function_handle.return_)?; - // function signature type paramters must be in bounds to the function type parameters + // function signature type parameters must be in bounds to the function type parameters let type_param_count = function_handle.type_parameters.len(); if let Some(sig) = self .view diff --git a/language/move-model/src/builder/module_builder.rs b/language/move-model/src/builder/module_builder.rs index 81b4adf003..c69e82b579 100644 --- a/language/move-model/src/builder/module_builder.rs +++ b/language/move-model/src/builder/module_builder.rs @@ -216,7 +216,7 @@ impl<'env, 'translator> ModuleBuilder<'env, 'translator> { /// Creates a SpecBlockContext from the given SpecBlockTarget. The context is used during /// definition analysis when visiting a schema block member (condition, invariant, etc.). - /// This returns None if the SpecBlockTarget cannnot be resolved; error reporting happens + /// This returns None if the SpecBlockTarget cannot be resolved; error reporting happens /// at caller side. fn get_spec_block_context<'pa>( &self, @@ -2925,7 +2925,7 @@ impl<'env, 'translator> ModuleBuilder<'env, 'translator> { } else { // This is calling a function from the module we are currently translating. // Need to recursively ensure we have computed used_spec_vars because of - // arbitrary call graphs, including cyclic. If visted_opt is not set, + // arbitrary call graphs, including cyclic. If visited_opt is not set, // we know we already computed this. if let Some(visited) = &mut visited_opt { self.compute_state_usage_and_callees_for_fun(visited, fid.as_usize()); diff --git a/language/move-model/src/lib.rs b/language/move-model/src/lib.rs index f1fe7fda3b..d09970356b 100644 --- a/language/move-model/src/lib.rs +++ b/language/move-model/src/lib.rs @@ -79,7 +79,7 @@ pub fn run_model_builder< } /// Build the move model with default compilation flags and custom options and a set of provided -/// named addreses. +/// named addresses. /// This collects transitive dependencies for move sources from the provided directory list. pub fn run_model_builder_with_options< Paths: Into + Clone, @@ -386,7 +386,7 @@ fn script_into_module(compiled_script: CompiledScript) -> CompiledModule { } }; - // Add a dummy adress if none exists. + // Add a dummy address if none exists. let dummy_addr = AccountAddress::new([0xff; AccountAddress::LENGTH]); let dummy_addr_idx = match script .address_identifiers diff --git a/language/move-model/src/model.rs b/language/move-model/src/model.rs index ebfb970677..97c44908c8 100644 --- a/language/move-model/src/model.rs +++ b/language/move-model/src/model.rs @@ -514,7 +514,7 @@ pub struct GlobalEnv { pub intrinsics: IntrinsicsAnnotation, /// A type-indexed container for storing extension data in the environment. extensions: RefCell>>, - /// The address of the standard and extension libaries. + /// The address of the standard and extension libraries. stdlib_address: Option, extlib_address: Option, } @@ -2285,12 +2285,12 @@ impl<'env> ModuleEnv<'env> { } /// Converts a constant to the specified type. The type must correspond to the expected - /// cannonical representation as defined in `move_core_types::values` + /// canonical representation as defined in `move_core_types::values` pub fn get_constant_value(&self, constant: &VMConstant) -> MoveValue { VMConstant::deserialize_constant(constant).unwrap() } - /// Return the `AccountAdress` of this module + /// Return the `AccountAddress` of this module pub fn self_address(&self) -> &AccountAddress { self.data.module.address() } @@ -3272,7 +3272,7 @@ impl<'env> FunctionEnv<'env> { self.definition_view().visibility() } - /// Return true if the function is an entry fucntion + /// Return true if the function is an entry function pub fn is_entry(&self) -> bool { self.definition_view().is_entry() } @@ -3308,7 +3308,7 @@ impl<'env> FunctionEnv<'env> { /// Returns true if the function is a script function pub fn is_script(&self) -> bool { - // The main function of a scipt is a script function + // The main function of a script is a script function self.module_env.is_script_module() || self.definition_view().is_entry() } diff --git a/language/move-model/src/simplifier/mod.rs b/language/move-model/src/simplifier/mod.rs index 56fb19fe29..586727b743 100644 --- a/language/move-model/src/simplifier/mod.rs +++ b/language/move-model/src/simplifier/mod.rs @@ -19,7 +19,7 @@ mod pass_inline; pub use pass::SpecRewriter; use pass_inline::SpecPassInline; -/// Available simplifications passes to run after tbe model is built +/// Available simplifications passes to run after the model is built #[derive(Clone, Debug, Serialize, Deserialize)] pub enum SimplificationPass { Inline, diff --git a/language/move-prover/boogie-backend/src/boogie_wrapper.rs b/language/move-prover/boogie-backend/src/boogie_wrapper.rs index 8f91ef6a77..58b010f935 100644 --- a/language/move-prover/boogie-backend/src/boogie_wrapper.rs +++ b/language/move-prover/boogie-backend/src/boogie_wrapper.rs @@ -1518,7 +1518,7 @@ impl ModelValue { let struct_name = &boogie_struct_name(struct_env, inst); let values = self .extract_list(struct_name) - // It appears sometimes keys are represented witout, sometimes with enclosing + // It appears sometimes keys are represented without, sometimes with enclosing // bars? .or_else(|| self.extract_list(&format!("|{}|", struct_name)))?; struct_env diff --git a/language/move-prover/boogie-backend/src/bytecode_translator.rs b/language/move-prover/boogie-backend/src/bytecode_translator.rs index 73143da6e5..c5971c0f92 100644 --- a/language/move-prover/boogie-backend/src/bytecode_translator.rs +++ b/language/move-prover/boogie-backend/src/bytecode_translator.rs @@ -1193,7 +1193,7 @@ impl<'env> FunctionTranslator<'env> { .iter() .cloned() .map(str_local) - // Add implict dest returns for &mut srcs: + // Add implicit dest returns for &mut srcs: // f(x) --> x := f(x) if type(x) = &mut_ .chain( srcs.iter() diff --git a/language/move-prover/bytecode/src/access_path.rs b/language/move-prover/bytecode/src/access_path.rs index c7c2450281..441ccbbf0c 100644 --- a/language/move-prover/bytecode/src/access_path.rs +++ b/language/move-prover/bytecode/src/access_path.rs @@ -770,7 +770,7 @@ impl AbsStructType { self.get_type().into_struct_tag(env) } - /// Substitue the open types in self.types with caller `type_actuals` + /// Substitute the open types in self.types with caller `type_actuals` pub fn substitute_footprint(&mut self, type_actuals: &[Type]) { for t in self.types.iter_mut() { *t = t.instantiate(type_actuals) diff --git a/language/move-prover/bytecode/src/dataflow_domains.rs b/language/move-prover/bytecode/src/dataflow_domains.rs index f0c48dff45..7f85992769 100644 --- a/language/move-prover/bytecode/src/dataflow_domains.rs +++ b/language/move-prover/bytecode/src/dataflow_domains.rs @@ -268,7 +268,7 @@ impl MapDomain { /// but this is not available in OrdMap for obvious reasons (because entries are shared), /// so we need to use this pattern here instead. pub fn update_values(&mut self, mut f: impl FnMut(&mut V)) { - // Commpute the key-values which actually changed. If the change is small, we preserve + // Compute the key-values which actually changed. If the change is small, we preserve // structure sharing. let new_values = self .iter() diff --git a/language/move-prover/bytecode/src/number_operation_analysis.rs b/language/move-prover/bytecode/src/number_operation_analysis.rs index c772880eaa..6e275a2206 100644 --- a/language/move-prover/bytecode/src/number_operation_analysis.rs +++ b/language/move-prover/bytecode/src/number_operation_analysis.rs @@ -132,7 +132,7 @@ impl NumberOperationState { } } -fn vector_table_funs_name_propogate_to_dest(callee_name: &str) -> bool { +fn vector_table_funs_name_propagate_to_dest(callee_name: &str) -> bool { callee_name.contains("borrow") || callee_name.contains("borrow_mut") || callee_name.contains("pop_back") @@ -142,7 +142,7 @@ fn vector_table_funs_name_propogate_to_dest(callee_name: &str) -> bool { || callee_name.contains("spec_get") } -fn vector_funs_name_propogate_to_srcs(callee_name: &str) -> bool { +fn vector_funs_name_propagate_to_srcs(callee_name: &str) -> bool { callee_name == "contains" || callee_name == "index_of" || callee_name == "append" @@ -150,7 +150,7 @@ fn vector_funs_name_propogate_to_srcs(callee_name: &str) -> bool { || callee_name == "insert" } -fn table_funs_name_propogate_to_srcs(callee_name: &str) -> bool { +fn table_funs_name_propagate_to_srcs(callee_name: &str) -> bool { callee_name == "add" || callee_name == "borrow_mut_with_default" || callee_name == "upsert" } @@ -301,7 +301,7 @@ impl<'a> NumberOperationAnalysis<'a> { let oper_first = global_state.get_node_num_oper(args[0].node_id()); // First argument is the target vector and the return type has the same NumberOperation type - if vector_table_funs_name_propogate_to_dest(&callee_name) { + if vector_table_funs_name_propagate_to_dest(&callee_name) { global_state.update_node_oper(*id, oper_first, true); } else { global_state.update_node_oper(*id, Bottom, allow_merge); @@ -1035,7 +1035,7 @@ impl<'a> TransferFunctions for NumberOperationAnalysis<'a> { .get_temp_index_oper(cur_mid, cur_fid, srcs[0], baseline_flag) .unwrap(); // Bitwise is specified explicitly in the fun or struct spec - if vector_table_funs_name_propogate_to_dest(&callee_name) { + if vector_table_funs_name_propagate_to_dest(&callee_name) { if *first_oper == Bitwise { // Do not consider the method remove_return_key where the first return value is k for dest in dests.iter() { @@ -1050,7 +1050,7 @@ impl<'a> TransferFunctions for NumberOperationAnalysis<'a> { let mut second_oper = first_oper; let mut src_idx = 0; if module_env.is_std_vector() - && vector_funs_name_propogate_to_srcs(&callee_name) + && vector_funs_name_propagate_to_srcs(&callee_name) { assert!(srcs.len() > 1); second_oper = global_state @@ -1062,7 +1062,7 @@ impl<'a> TransferFunctions for NumberOperationAnalysis<'a> { ) .unwrap(); src_idx = 1; - } else if table_funs_name_propogate_to_srcs(&callee_name) { + } else if table_funs_name_propagate_to_srcs(&callee_name) { assert!(srcs.len() > 2); second_oper = global_state .get_temp_index_oper( diff --git a/language/move-prover/bytecode/src/read_write_set_analysis.rs b/language/move-prover/bytecode/src/read_write_set_analysis.rs index 8e859f3958..7c4fe0cba7 100644 --- a/language/move-prover/bytecode/src/read_write_set_analysis.rs +++ b/language/move-prover/bytecode/src/read_write_set_analysis.rs @@ -899,8 +899,8 @@ impl ReadWriteSetState { pub fn normalize(&self, env: &GlobalEnv) -> ReadWriteSet { let mut analysis_result = ReadWriteSet::new(); self.accesses.iter_paths(|access_path, access| { - let access_pathes = access_path.normalize(env); - for concrete_access_path in access_pathes { + let access_paths = access_path.normalize(env); + for concrete_access_path in access_paths { analysis_result.add_access_path(concrete_access_path, *access); } }); diff --git a/language/move-prover/doc/user/docgen.md b/language/move-prover/doc/user/docgen.md index 337849e940..a0b3721e8c 100644 --- a/language/move-prover/doc/user/docgen.md +++ b/language/move-prover/doc/user/docgen.md @@ -124,7 +124,7 @@ decorated as follows: positives, as the generator does not analyze the syntax right now. - Identifiers are attempted to resolve against the documented code and on success, hyperlinked to the declaration. - For example, within the `DiemAccount` module, all occurences of `T`, `Self::T`, `DiemAccount::T`, and + For example, within the `DiemAccount` module, all occurrences of `T`, `Self::T`, `DiemAccount::T`, and `0x1::DiemAccount:T` will resolve into a link to the declaration. This resolution is heuristic and may have positive and negative false positives. Specifically, it currently does not consider aliases and use-declarations. diff --git a/language/move-prover/interpreter/src/concrete/value.rs b/language/move-prover/interpreter/src/concrete/value.rs index e347e6e422..dcb407f92d 100644 --- a/language/move-prover/interpreter/src/concrete/value.rs +++ b/language/move-prover/interpreter/src/concrete/value.rs @@ -1328,7 +1328,7 @@ impl EvalState { .cloned() } - /// Populate a global state with the resources saved by the given memmory label + /// Populate a global state with the resources saved by the given memory label pub fn register_memory(&self, label: &MemoryLabel, global_state: &mut GlobalState) { for inst_map in self.saved_memory.get(label).unwrap().values() { for (inst, account_map) in inst_map { diff --git a/language/move-stdlib/tests/vector_tests.move b/language/move-stdlib/tests/vector_tests.move index e32eabc441..d23f5e7b7a 100644 --- a/language/move-stdlib/tests/vector_tests.move +++ b/language/move-stdlib/tests/vector_tests.move @@ -425,9 +425,9 @@ module std::vector_tests { assert!(index == 1, 1); } - // index_of will return the index first occurence that is equal + // index_of will return the index first occurrence that is equal #[test] - fun index_of_nonempty_has_multiple_occurences() { + fun index_of_nonempty_has_multiple_occurrences() { let v = V::empty(); V::push_back(&mut v, false); V::push_back(&mut v, true); diff --git a/language/move-vm/integration-tests/src/tests/bad_storage_tests.rs b/language/move-vm/integration-tests/src/tests/bad_storage_tests.rs index 533d007d00..eacf561f1a 100644 --- a/language/move-vm/integration-tests/src/tests/bad_storage_tests.rs +++ b/language/move-vm/integration-tests/src/tests/bad_storage_tests.rs @@ -105,8 +105,8 @@ fn test_malformed_resource() { let (changeset, _) = sess.finish().unwrap(); storage.apply(changeset).unwrap(); - // Execut the second script and make sure it succeeds. This script simply checks - // that the published resource is what we expect it to be. This inital run is to ensure + // Execute the second script and make sure it succeeds. This script simply checks + // that the published resource is what we expect it to be. This initial run is to ensure // the testing environment is indeed free of errors without external interference. let mut script_blob = vec![]; s2.serialize(&mut script_blob).unwrap(); diff --git a/language/move-vm/runtime/src/interpreter.rs b/language/move-vm/runtime/src/interpreter.rs index 25d4024855..f1ab48830c 100644 --- a/language/move-vm/runtime/src/interpreter.rs +++ b/language/move-vm/runtime/src/interpreter.rs @@ -467,14 +467,14 @@ impl Interpreter { } else { Err(self.set_location(PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) .with_message( - format!("Private/Friend function invokation error, caller: {:?}::{:?}, callee: {:?}::{:?}", caller_id, caller.name(), callee_id, callee.name()), + format!("Private/Friend function invocation error, caller: {:?}::{:?}, callee: {:?}::{:?}", caller_id, caller.name(), callee_id, callee.name()), ))) } } _ => Err(self.set_location( PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR) .with_message(format!( - "Private/Friend function invokation error caller: {:?}, callee {:?}", + "Private/Friend function invocation error caller: {:?}, callee {:?}", caller.name(), callee.name() )), diff --git a/language/move-vm/runtime/src/loader.rs b/language/move-vm/runtime/src/loader.rs index ba7abd5486..d1f288015c 100644 --- a/language/move-vm/runtime/src/loader.rs +++ b/language/move-vm/runtime/src/loader.rs @@ -2525,7 +2525,7 @@ struct FunctionInstantiation { struct StructDef { // struct field count field_count: u16, - // `ModuelCache::structs` global table index + // `ModuleCache::structs` global table index idx: CachedStructIndex, } @@ -2533,7 +2533,7 @@ struct StructDef { struct StructInstantiation { // struct field count field_count: u16, - // `ModuelCache::structs` global table index. It is the generic type. + // `ModuleCache::structs` global table index. It is the generic type. def: CachedStructIndex, instantiation: Vec, } @@ -2542,7 +2542,7 @@ struct StructInstantiation { #[derive(Debug)] struct FieldHandle { offset: usize, - // `ModuelCache::structs` global table index. It is the generic type. + // `ModuleCache::structs` global table index. It is the generic type. owner: CachedStructIndex, } @@ -2550,7 +2550,7 @@ struct FieldHandle { #[derive(Debug)] struct FieldInstantiation { offset: usize, - // `ModuelCache::structs` global table index. It is the generic type. + // `ModuleCache::structs` global table index. It is the generic type. #[allow(unused)] owner: CachedStructIndex, instantiation: Vec, diff --git a/language/move-vm/runtime/src/move_vm.rs b/language/move-vm/runtime/src/move_vm.rs index 428e1109d0..d139959f5f 100644 --- a/language/move-vm/runtime/src/move_vm.rs +++ b/language/move-vm/runtime/src/move_vm.rs @@ -43,12 +43,12 @@ impl MoveVM { /// Right now it is the caller's responsibility to ensure cache coherence of the Move VM Loader /// - When a module gets published in a Move VM Session, and then gets used by another /// transaction, it will be loaded into the code cache and stay there even if the resulted - /// effects do not get commited back to the storage when the Session ends. + /// effects do not get committed back to the storage when the Session ends. /// - As a result, if one wants to have multiple sessions at a time, one needs to make sure /// none of them will try to publish a module. In other words, if there is a module publishing /// Session it must be the only Session existing. /// - In general, a new Move VM needs to be created whenever the storage gets modified by an - /// outer envrionment, or otherwise the states may be out of sync. There are a few exceptional + /// outer environment, or otherwise the states may be out of sync. There are a few exceptional /// cases where this may not be necessary, with the most notable one being the common module /// publishing flow: you can keep using the same Move VM if you publish some modules in a Session /// and apply the effects to the storage when the Session ends. diff --git a/language/move-vm/runtime/src/unit_tests/vm_arguments_tests.rs b/language/move-vm/runtime/src/unit_tests/vm_arguments_tests.rs index 690e3e2a7a..011825b205 100644 --- a/language/move-vm/runtime/src/unit_tests/vm_arguments_tests.rs +++ b/language/move-vm/runtime/src/unit_tests/vm_arguments_tests.rs @@ -800,7 +800,7 @@ fn call_missing_item() { let module = empty_module(); let id = &module.self_id(); let function_name = IdentStr::new("foo").unwrap(); - // mising module + // missing module let move_vm = MoveVM::new(vec![]).unwrap(); let mut remote_view = RemoteStore::new(); let mut session = move_vm.new_session(&remote_view); diff --git a/language/move-vm/types/src/natives/function.rs b/language/move-vm/types/src/natives/function.rs index e143b01d54..ba32927fe9 100644 --- a/language/move-vm/types/src/natives/function.rs +++ b/language/move-vm/types/src/natives/function.rs @@ -13,7 +13,7 @@ //! ) -> PartialVMResult;` //! //! arguments are passed with first argument at position 0 and so forth. -//! Popping values from `arguments` gives the aguments in reverse order (last first). +//! Popping values from `arguments` gives the arguments in reverse order (last first). //! This module contains the declarations and utilities to implement a native //! function. @@ -57,7 +57,7 @@ impl NativeResult { /// Failed execution. The failure is a runtime failure in the function and not an invariant /// failure of the VM which would raise a `PartialVMError` error directly. - /// The only thing the funciton can specify is its abort code, as if it had invoked the `Abort` + /// The only thing the function can specify is its abort code, as if it had invoked the `Abort` /// bytecode instruction pub fn err(cost: InternalGas, abort_code: u64) -> Self { NativeResult::Abort { cost, abort_code } diff --git a/language/move-vm/types/src/values/values_impl.rs b/language/move-vm/types/src/values/values_impl.rs index 412c1848bd..5b28936cbe 100644 --- a/language/move-vm/types/src/values/values_impl.rs +++ b/language/move-vm/types/src/values/values_impl.rs @@ -3225,7 +3225,7 @@ impl Value { * Destructors * **************************************************************************************/ -// Locals may contain reference values that points to the same cotnainer through Rc, hencing forming +// Locals may contain reference values that points to the same container through Rc, hencing forming // a cycle. Therefore values need to be manually taken out of the Locals in order to not leak memory. impl Drop for Locals { fn drop(&mut self) { @@ -3243,7 +3243,7 @@ impl Container { use Container::*; match self { - Locals(_) => unreachable!("Should not ba able to visit a Locals container directly"), + Locals(_) => unreachable!("Should not be able to visit a Locals container directly"), Vec(r) => { let r = r.borrow(); if visitor.visit_vec(depth, r.len()) { diff --git a/language/testing-infra/test-generation/src/abstract_state.rs b/language/testing-infra/test-generation/src/abstract_state.rs index 6a53b4b3b8..b5521700bd 100644 --- a/language/testing-infra/test-generation/src/abstract_state.rs +++ b/language/testing-infra/test-generation/src/abstract_state.rs @@ -414,7 +414,7 @@ impl InstantiableModule { /// An AbstractState represents an abstract view of the execution of the /// Move VM. Rather than considering values of items on the stack or in /// the locals, we only consider their type, represented by a `AbstractValue` -/// and their availibility, represented by the `BorrowState`. +/// and their availability, represented by the `BorrowState`. #[derive(Debug, Clone)] pub struct AbstractState { /// A Vector of `AbstractValue`s representing the VM value stack diff --git a/language/testing-infra/test-generation/src/lib.rs b/language/testing-infra/test-generation/src/lib.rs index 05e2bfbf83..38af802e19 100644 --- a/language/testing-infra/test-generation/src/lib.rs +++ b/language/testing-infra/test-generation/src/lib.rs @@ -358,7 +358,7 @@ pub fn run_generation(args: Args) { ); let (sender, receiver) = bounded(num_threads); - let (stats_sender, stats_reciever) = unbounded(); + let (stats_sender, stats_receiver) = unbounded(); let seed = seed(args.seed); let mut threads = Vec::new(); @@ -379,7 +379,7 @@ pub fn run_generation(args: Args) { let num_iters = args.num_iterations; threads.push(thread::spawn(move || { - module_frame_generation(num_iters, seed, sender, stats_reciever) + module_frame_generation(num_iters, seed, sender, stats_receiver) })); for thread in threads { diff --git a/language/testing-infra/test-generation/src/transitions.rs b/language/testing-infra/test-generation/src/transitions.rs index 4b35fdcc51..3e1977495a 100644 --- a/language/testing-infra/test-generation/src/transitions.rs +++ b/language/testing-infra/test-generation/src/transitions.rs @@ -46,7 +46,7 @@ impl Subst { match (stack_sig, instr_sig) { (tok, SignatureToken::TypeParameter(idx)) => { if let Some(other_type) = self.subst.get(&(idx as usize)).cloned() { - // If we have already defined a subtitution for this type parameter, then make + // If we have already defined a substitution for this type parameter, then make // sure the signature token on the stack is amenable with the type selection. tok == other_type } else { @@ -97,9 +97,9 @@ impl Subst { pub fn abilities_for_token( state: &AbstractState, token: &SignatureToken, - type_paramters: &[AbilitySet], + type_parameters: &[AbilitySet], ) -> AbilitySet { - abilities(&state.module.module, token, type_paramters) + abilities(&state.module.module, token, type_parameters) } /// Given a locals signature index, determine the abilities for each signature token. Restricted for @@ -1236,7 +1236,7 @@ macro_rules! state_local_take_borrow { }; } -/// Wrapper for enclosing the arguments of `local_palce` so that only the `state` needs +/// Wrapper for enclosing the arguments of `local_place` so that only the `state` needs /// to be given. #[macro_export] macro_rules! state_local_place { diff --git a/language/tools/move-coverage/src/summary.rs b/language/tools/move-coverage/src/summary.rs index cfd399aad5..bdce506870 100644 --- a/language/tools/move-coverage/src/summary.rs +++ b/language/tools/move-coverage/src/summary.rs @@ -136,7 +136,7 @@ pub fn summarize_inst_cov_by_module( let fn_handle = module.function_handle_at(function_def.function); let fn_name = module.identifier_at(fn_handle.name).to_owned(); - let fn_summmary = match &function_def.code { + let fn_summary = match &function_def.code { None => FunctionSummary { fn_is_native: true, total: 0, @@ -160,7 +160,7 @@ pub fn summarize_inst_cov_by_module( } }; - (fn_name, fn_summmary) + (fn_name, fn_summary) }) .collect(); @@ -419,7 +419,7 @@ pub fn summarize_path_cov(module: &CompiledModule, trace_map: &TraceMap) -> Modu let fn_handle = module.function_handle_at(function_def.function); let fn_name = module.identifier_at(fn_handle.name).to_owned(); - let fn_summmary = match &function_def.code { + let fn_summary = match &function_def.code { None => FunctionSummary { fn_is_native: true, total: 0, @@ -435,7 +435,7 @@ pub fn summarize_path_cov(module: &CompiledModule, trace_map: &TraceMap) -> Modu }, }; - (fn_name, fn_summmary) + (fn_name, fn_summary) }) .collect(); diff --git a/language/tools/move-disassembler/src/main.rs b/language/tools/move-disassembler/src/main.rs index 076a4b5506..69214cffc1 100644 --- a/language/tools/move-disassembler/src/main.rs +++ b/language/tools/move-disassembler/src/main.rs @@ -123,7 +123,7 @@ fn main() { ); } - let dissassemble_string = disassembler.disassemble().expect("Unable to dissassemble"); + let disassemble_string = disassembler.disassemble().expect("Unable to disassemble"); - println!("{}", dissassemble_string); + println!("{}", disassemble_string); } diff --git a/language/tools/move-package/src/compilation/compiled_package.rs b/language/tools/move-package/src/compilation/compiled_package.rs index 72a9370b30..db1b31c1a1 100644 --- a/language/tools/move-package/src/compilation/compiled_package.rs +++ b/language/tools/move-package/src/compilation/compiled_package.rs @@ -676,7 +676,7 @@ impl CompiledPackage { // We take the (restrictive) view that all filesystems are case insensitive to maximize // portability of packages. fn check_filepaths_ok(&self) -> Result<()> { - // A mapping of (lowercase_name => [info_for_each_occurence] + // A mapping of (lowercase_name => [info_for_each_occurrence] let mut insensitive_mapping = BTreeMap::new(); for compiled_unit in &self.root_compiled_units { let is_module = matches!(&compiled_unit.unit, CompiledUnit::Module(_)); @@ -695,9 +695,9 @@ impl CompiledPackage { } let errs = insensitive_mapping .into_iter() - .filter_map(|(insensitive_name, occurence_infos)| { - if occurence_infos.len() > 1 { - let name_conflict_error_msg = occurence_infos + .filter_map(|(insensitive_name, occurrence_infos)| { + if occurrence_infos.len() > 1 { + let name_conflict_error_msg = occurrence_infos .into_iter() .map(|(name, is_module, fpath)| { format!( diff --git a/language/tools/move-package/src/resolution/dependency_graph.rs b/language/tools/move-package/src/resolution/dependency_graph.rs index 555549e3cb..e545c1caf8 100644 --- a/language/tools/move-package/src/resolution/dependency_graph.rs +++ b/language/tools/move-package/src/resolution/dependency_graph.rs @@ -70,7 +70,7 @@ enum DependencyMode { } /// Wrapper struct to display a dependency as an inline table in the lock file (matching the -/// convention in the source manifest). This is necessary becase the `toml` crate does not +/// convention in the source manifest). This is necessary because the `toml` crate does not /// currently support serializing types as inline tables. struct DependencyTOML<'a>(&'a Dependency); struct SubstTOML<'a>(&'a Substitution); diff --git a/language/tools/move-package/tests/test_additional_addresses.rs b/language/tools/move-package/tests/test_additional_addresses.rs index fdaf81715c..1290eed4a0 100644 --- a/language/tools/move-package/tests/test_additional_addresses.rs +++ b/language/tools/move-package/tests/test_additional_addresses.rs @@ -10,7 +10,7 @@ use std::{collections::BTreeMap, path::Path}; use tempfile::tempdir; #[test] -fn test_additonal_addresses() { +fn test_additional_addresses() { let path = Path::new("tests/test_sources/basic_no_deps_address_not_assigned_with_dev_assignment"); let pm = MP::parse_move_manifest_from_file(path).unwrap(); @@ -50,7 +50,7 @@ fn test_additonal_addresses() { } #[test] -fn test_additonal_addresses_already_assigned_same_value() { +fn test_additional_addresses_already_assigned_same_value() { let path = Path::new("tests/test_sources/basic_no_deps_address_assigned"); let pm = MP::parse_move_manifest_from_file(path).unwrap(); @@ -76,7 +76,7 @@ fn test_additonal_addresses_already_assigned_same_value() { } #[test] -fn test_additonal_addresses_already_assigned_different_value() { +fn test_additional_addresses_already_assigned_different_value() { let path = Path::new("tests/test_sources/basic_no_deps_address_assigned"); let pm = MP::parse_move_manifest_from_file(path).unwrap();