Przeglądaj źródła

fix: Correct minor typos (#6132)

Chris Ohk 2 lat temu
rodzic
commit
26f306d65c

+ 1 - 1
core/tauri/build.rs

@@ -142,7 +142,7 @@ fn main() {
   )
   .expect("failed to write checked_features file");
 
-  // workaround needed to preven `STATUS_ENTRYPOINT_NOT_FOUND` error
+  // workaround needed to prevent `STATUS_ENTRYPOINT_NOT_FOUND` error
   // see https://github.com/tauri-apps/tauri/pull/4383#issuecomment-1212221864
   let target_os = std::env::var("CARGO_CFG_TARGET_OS");
   let target_env = std::env::var("CARGO_CFG_TARGET_ENV");

+ 1 - 1
core/tauri/src/api/ipc.rs

@@ -281,7 +281,7 @@ mod test {
 
   // check arbitrary strings in the format callback function
   #[quickcheck]
-  fn qc_formating(f: CallbackFn, a: String) -> bool {
+  fn qc_formatting(f: CallbackFn, a: String) -> bool {
     // call format callback
     let fc = format_callback(f, &a).unwrap();
     fc.contains(&format!(

+ 2 - 2
core/tauri/src/plugin.rs

@@ -35,7 +35,7 @@ pub trait Plugin<R: Runtime>: Send {
   /// it's recommended to check the `window.location` to guard your script from running on unexpected origins.
   ///
   /// The script is wrapped into its own context with `(function () { /* your script here */ })();`,
-  /// so global variables must be assigned to `window` instead of implicity declared.
+  /// so global variables must be assigned to `window` instead of implicitly declared.
   fn initialization_script(&self) -> Option<String> {
     None
   }
@@ -203,7 +203,7 @@ impl<R: Runtime, C: DeserializeOwned> Builder<R, C> {
   /// it's recommended to check the `window.location` to guard your script from running on unexpected origins.
   ///
   /// The script is wrapped into its own context with `(function () { /* your script here */ })();`,
-  /// so global variables must be assigned to `window` instead of implicity declared.
+  /// so global variables must be assigned to `window` instead of implicitly declared.
   ///
   /// Note that calling this function multiple times overrides previous values.
   ///

+ 1 - 1
tooling/api/tsup.config.ts

@@ -22,7 +22,7 @@ export default defineConfig(() => [
     platform: 'browser',
     dts: false,
     // esbuild `globalName` option generates `var __TAURI_IIFE__ = (() => {})()`
-    // and var is not guaranted to assign to the global `window` object so we make sure to assign it
+    // and var is not guaranteed to assign to the global `window` object so we make sure to assign it
     footer: {
       js: 'window.__TAURI__ = __TAURI_IIFE__'
     }

+ 3 - 3
tooling/bench/src/build_benchmark_jsons.rs

@@ -26,10 +26,10 @@ fn main() {
   let mut all_data: Vec<utils::BenchResult> =
     serde_json::from_reader(all_data_buffer).expect("Unable to read all data buffer");
 
-  // add current data to alls data
+  // add current data to all data
   all_data.push(current_data);
 
-  // use only latest 20 elements from alls data
+  // use only latest 20 elements from all data
   let recent: Vec<utils::BenchResult> = if all_data.len() > 20 {
     all_data[all_data.len() - 20..].to_vec()
   } else {
@@ -41,7 +41,7 @@ fn main() {
     tauri_data
       .to_str()
       .expect("Something wrong with tauri_data"),
-    &serde_json::to_value(&all_data).expect("Unable to build final json (alls)"),
+    &serde_json::to_value(&all_data).expect("Unable to build final json (all)"),
   )
   .unwrap_or_else(|_| panic!("Unable to write {:?}", tauri_data));
 

+ 1 - 1
tooling/bundler/src/bundle/macos/icon.rs

@@ -15,7 +15,7 @@ use std::{
 use image::GenericImageView;
 
 // Given a list of icon files, try to produce an ICNS file in the out_dir
-// nd return the path to it.  Returns `Ok(None)` if no usable icons
+// and return the path to it.  Returns `Ok(None)` if no usable icons
 // were provided.
 pub fn create_icns_file(out_dir: &Path, settings: &Settings) -> crate::Result<Option<PathBuf>> {
   if settings.icon_files().count() == 0 {

+ 2 - 2
tooling/bundler/src/bundle/windows/util.rs

@@ -41,12 +41,12 @@ pub enum HashAlgorithm {
 pub fn download_and_verify(
   url: &str,
   hash: &str,
-  hash_algorithim: HashAlgorithm,
+  hash_algorithm: HashAlgorithm,
 ) -> crate::Result<Vec<u8>> {
   let data = download(url)?;
   info!("validating hash");
 
-  match hash_algorithim {
+  match hash_algorithm {
     #[cfg(target_os = "windows")]
     HashAlgorithm::Sha256 => {
       let hasher = sha2::Sha256::new();