From 6d10b5e53e9d829329176238a0f8af0436769632 Mon Sep 17 00:00:00 2001 From: camcui Date: Fri, 17 Jan 2025 15:40:26 +0800 Subject: [PATCH] chore: fix spelling issues Signed-off-by: camcui --- crates/compilers/src/compile/project.rs | 2 +- crates/compilers/src/flatten.rs | 6 +++--- crates/compilers/src/lib.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/compilers/src/compile/project.rs b/crates/compilers/src/compile/project.rs index 7764df46..503f5cba 100644 --- a/crates/compilers/src/compile/project.rs +++ b/crates/compilers/src/compile/project.rs @@ -82,7 +82,7 @@ //! provided to solc. //! For every file the cache file contains a dedicated [cache entry](crate::cache::CacheEntry), //! which represents the state of the file. A solidity file can contain several contracts, for every -//! contract a separate [artifact](crate::Artifact) is emitted. Therefor the entry also tracks all +//! contract a separate [artifact](crate::Artifact) is emitted. Therefore the entry also tracks all //! artifacts emitted by a file. A solidity file can also be compiled with several solc versions. //! //! For example in `A(<=0.8.10) imports C(>0.4.0)` and diff --git a/crates/compilers/src/flatten.rs b/crates/compilers/src/flatten.rs index 12bb0145..01d4d246 100644 --- a/crates/compilers/src/flatten.rs +++ b/crates/compilers/src/flatten.rs @@ -115,7 +115,7 @@ impl Visitor for ReferencesCollector { type Updates = HashMap>; pub struct FlatteningResult<'a> { - /// Updated source in the order they shoud be written to the output file. + /// Updated source in the order they should be written to the output file. sources: Vec, /// Pragmas that should be present in the target file. pragmas: Vec, @@ -361,7 +361,7 @@ impl Flattener { /// /// This approach works by firstly collecting all IDs of import directives, and then looks for /// any references of them. Once the reference is found, it's full length is getting removed - /// from source + 1 charater ('.') + /// from source + 1 character ('.') /// /// This should work correctly for vast majority of cases, however there are situations for /// which such approach won't work, most of which are related to code being formatted in an @@ -750,7 +750,7 @@ impl Flattener { .collect() } - /// Removes all license identifiers from all sources. Returns licesnse identifier from target + /// Removes all license identifiers from all sources. Returns license identifier from target /// file, if any. fn process_licenses(&self, updates: &mut Updates) -> Option<&str> { let mut target_license = None; diff --git a/crates/compilers/src/lib.rs b/crates/compilers/src/lib.rs index 58f543fa..a4dacbc9 100644 --- a/crates/compilers/src/lib.rs +++ b/crates/compilers/src/lib.rs @@ -79,7 +79,7 @@ pub struct Project< /// Additional settings for cases when default compiler settings are not enough to cover all /// possible restrictions. pub additional_settings: BTreeMap, - /// Mapping from file path to requrements on settings to compile it. + /// Mapping from file path to requirements on settings to compile it. /// /// This file will only be included into compiler inputs with profiles which satisfy the /// restrictions.