Skip to content

Commit

Permalink
chore: fix various typos (#9131)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 committed Mar 11, 2024
1 parent ba0206d commit 26f0f71
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion core/tauri-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ impl WindowsAttributes {
/// # Example
///
/// The following manifest will brand the exe as requesting administrator privileges.
/// Thus, everytime it is executed, a Windows UAC dialog will appear.
/// Thus, every time it is executed, a Windows UAC dialog will appear.
///
/// ```rust,no_run
/// let mut windows = tauri_build::WindowsAttributes::new();
Expand Down
8 changes: 4 additions & 4 deletions core/tauri-plugin/src/build/mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,12 @@ fn insert_into_xml(xml: &str, block_identifier: &str, parent_tag: &str, contents
}

if let Some(index) = line.find(&parent_closing_tag) {
let identation = " ".repeat(index + 4);
rewritten.push(format!("{}{}", identation, block_comment));
let indentation = " ".repeat(index + 4);
rewritten.push(format!("{}{}", indentation, block_comment));
for l in contents.split('\n') {
rewritten.push(format!("{}{}", identation, l));
rewritten.push(format!("{}{}", indentation, l));
}
rewritten.push(format!("{}{}", identation, block_comment));
rewritten.push(format!("{}{}", indentation, block_comment));
}

rewritten.push(line.to_string());
Expand Down
4 changes: 2 additions & 2 deletions core/tauri-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ pub trait WebviewDispatch<T: UserEvent>: Debug + Clone + Send + Sync + Sized + '

// SETTER

/// Naviagte to the given URL.
/// Navigate to the given URL.
fn navigate(&self, url: Url) -> Result<()>;

/// Opens the dialog to prints the contents of the webview.
Expand Down Expand Up @@ -517,7 +517,7 @@ pub trait WindowDispatch<T: UserEvent>: Debug + Clone + Send + Sync + Sized + 's
/// - **Linux / iOS / Android:** Unsupported.
fn is_maximizable(&self) -> Result<bool>;

/// Gets the window's native minize button state.
/// Gets the window's native minimize button state.
///
/// ## Platform-specific
///
Expand Down
12 changes: 6 additions & 6 deletions core/tauri-utils/src/acl/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pub enum ParseIdentifierError {

/// Identifier is too long.
#[error("identifiers cannot be longer than {}, found {0}", MAX_LEN_IDENTIFIER)]
Humungous(usize),
Humongous(usize),

/// Identifier is not in a valid format.
#[error("identifiers can only include lowercase ASCII, hyphens which are not leading or trailing, and a single colon if using a prefix")]
Expand Down Expand Up @@ -158,7 +158,7 @@ impl TryFrom<String> for Identifier {

let mut bytes = value.bytes();
if bytes.len() > MAX_LEN_IDENTIFIER {
return Err(Self::Error::Humungous(bytes.len()));
return Err(Self::Error::Humongous(bytes.len()));
}

// grab the first byte only before parsing the rest
Expand All @@ -168,16 +168,16 @@ impl TryFrom<String> for Identifier {
.ok_or(Self::Error::InvalidFormat)?;

let mut idx = 0;
let mut seperator = None;
let mut separator = None;
for byte in bytes {
idx += 1; // we already consumed first item
match prev.next(byte) {
None => return Err(Self::Error::InvalidFormat),
Some(next @ ValidByte::Byte(_)) => prev = next,
Some(ValidByte::Separator) => {
if seperator.is_none() {
if separator.is_none() {
// safe to unwrap because idx starts at 1 and cannot go over MAX_IDENTIFIER_LEN
seperator = Some(idx.try_into().unwrap());
separator = Some(idx.try_into().unwrap());
prev = ValidByte::Separator
} else {
return Err(Self::Error::MultipleSeparators);
Expand All @@ -198,7 +198,7 @@ impl TryFrom<String> for Identifier {

Ok(Self {
inner: value,
separator: seperator,
separator,
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-utils/src/acl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ pub enum ExecutionContext {
/// A local URL is used (the Tauri app URL).
#[default]
Local,
/// Remote URL is tring to use the IPC.
/// Remote URL is trying to use the IPC.
Remote {
/// The URL trying to access the IPC (URL pattern).
url: RemoteUrlPattern,
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ pub enum RunEvent {
ExitRequested {
/// Exit code.
/// [`Option::None`] when the exit is requested by user interaction,
/// [`Option::Some`] when requested programatically via [`AppHandle#method.exit`] and [`AppHandle#method.restart`].
/// [`Option::Some`] when requested programmatically via [`AppHandle#method.exit`] and [`AppHandle#method.restart`].
code: Option<i32>,
/// Event API
api: ExitRequestApi,
Expand Down Expand Up @@ -542,7 +542,7 @@ macro_rules! shared_app_impl {
self.manager.tray.icons.lock().unwrap().first().cloned()
}

/// Removes the first tray icon registerd, usually the one configured in
/// Removes the first tray icon registered, usually the one configured in
/// tauri config file, from tauri's internal state and returns it.
///
/// Note that dropping the returned icon, will cause the tray icon to disappear.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/ipc/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ impl RuntimeAuthority {
}
}

/// List of allowed and denied objects that match either the command-specific or plugin global scope criterias.
/// List of allowed and denied objects that match either the command-specific or plugin global scope criteria.
#[derive(Debug)]
pub struct ScopeValue<T: ScopeObject> {
allow: Arc<Vec<Arc<T>>>,
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/manager/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub struct MenuManager<R: Runtime> {
/// A set containing a reference to the active menus, including
/// the app-wide menu and the window-specific menus
///
/// This should be mainly used to acceess [`Menu::haccel`]
/// This should be mainly used to access [`Menu::haccel`]
/// to setup the accelerator handling in the event loop
pub menus: Arc<Mutex<HashMap<MenuId, Menu<R>>>>,
/// The menu set to all windows.
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/menu/builders/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#![cfg(desktop)]

//! A module containting menu builder types
//! A module containing menu builder types

mod menu;
pub use menu::MenuBuilder;
Expand Down
16 changes: 8 additions & 8 deletions core/tauri/src/menu/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl<R: Runtime> Menu<R> {

/// Add a menu item to the end of this menu.
///
/// ## Platform-spcific:
/// ## Platform-specific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu.
///
Expand All @@ -268,7 +268,7 @@ impl<R: Runtime> Menu<R> {

/// Add menu items to the end of this menu. It calls [`Menu::append`] in a loop internally.
///
/// ## Platform-spcific:
/// ## Platform-specific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu
///
Expand All @@ -283,7 +283,7 @@ impl<R: Runtime> Menu<R> {

/// Add a menu item to the beginning of this menu.
///
/// ## Platform-spcific:
/// ## Platform-specific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu
///
Expand All @@ -298,7 +298,7 @@ impl<R: Runtime> Menu<R> {

/// Add menu items to the beginning of this menu. It calls [`Menu::insert_items`] with position of `0` internally.
///
/// ## Platform-spcific:
/// ## Platform-specific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu
///
Expand All @@ -307,9 +307,9 @@ impl<R: Runtime> Menu<R> {
self.insert_items(items, 0)
}

/// Insert a menu item at the specified `postion` in the menu.
/// Insert a menu item at the specified `position` in the menu.
///
/// ## Platform-spcific:
/// ## Platform-specific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu
///
Expand All @@ -322,9 +322,9 @@ impl<R: Runtime> Menu<R> {
.map_err(Into::into)
}

/// Insert menu items at the specified `postion` in the menu.
/// Insert menu items at the specified `position` in the menu.
///
/// ## Platform-spcific:
/// ## Platform-specific:
///
/// - **macOS:** Only [`Submenu`] can be added to the menu
///
Expand Down
4 changes: 2 additions & 2 deletions core/tauri/src/menu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ gen_wrappers!(
MenuItem(MenuItemInner, MenuItem),
/// A type that is a submenu inside a [`Menu`] or [`Submenu`]
Submenu(SubmenuInner, Submenu),
/// A predefined (native) menu item which has a predfined behavior by the OS or by this crate.
/// A predefined (native) menu item which has a predefined behavior by the OS or by this crate.
PredefinedMenuItem(PredefinedMenuItemInner, Predefined),
/// A menu item inside a [`Menu`] or [`Submenu`]
/// and usually contains a text and a check mark or a similar toggle
Expand Down Expand Up @@ -228,7 +228,7 @@ pub struct AboutMetadata<'a> {
pub struct AboutMetadataBuilder<'a>(AboutMetadata<'a>);

impl<'a> AboutMetadataBuilder<'a> {
/// Create a new about metdata builder.
/// Create a new about metadata builder.
pub fn new() -> Self {
Default::default()
}
Expand Down
6 changes: 3 additions & 3 deletions core/tauri/src/menu/submenu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl<R: Runtime> Submenu<R> {
self.insert_items(items, 0)
}

/// Insert a menu item at the specified `postion` in this submenu.
/// Insert a menu item at the specified `position` in this submenu.
pub fn insert(&self, item: &dyn IsMenuItem<R>, position: usize) -> crate::Result<()> {
let kind = item.kind();
run_item_main_thread!(self, |self_: Self| {
Expand All @@ -202,7 +202,7 @@ impl<R: Runtime> Submenu<R> {
.map_err(Into::into)
}

/// Insert menu items at the specified `postion` in this submenu.
/// Insert menu items at the specified `position` in this submenu.
pub fn insert_items(&self, items: &[&dyn IsMenuItem<R>], position: usize) -> crate::Result<()> {
for (i, item) in items.iter().enumerate() {
self.insert(*item, position + i)?
Expand Down Expand Up @@ -260,7 +260,7 @@ impl<R: Runtime> Submenu<R> {

/// Set the text for this submenu. `text` could optionally contain
/// an `&` before a character to assign this character as the mnemonic
/// for this submenu. To display a `&` without assigning a mnemenonic, use `&&`.
/// for this submenu. To display a `&` without assigning a mnemonic, use `&&`.
pub fn set_text<S: AsRef<str>>(&self, text: S) -> crate::Result<()> {
let text = text.as_ref().to_string();
run_item_main_thread!(self, |self_: Self| (*self_.0).as_ref().set_text(text))
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ impl<R: Runtime, C: DeserializeOwned> Builder<R, C> {
///
/// # Known limitations
///
/// URI scheme protocols are registered when the webview is created. Due to this limitation, if the plugin is registed after a webview has been created, this protocol won't be available.
/// URI scheme protocols are registered when the webview is created. Due to this limitation, if the plugin is registered after a webview has been created, this protocol won't be available.
///
/// # Arguments
///
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/tray/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Default for ClickType {
///
/// ## Platform-specific:
///
/// - **Linux**: Unsupported. The event is not emmited even though the icon is shown,
/// - **Linux**: Unsupported. The event is not emitted even though the icon is shown,
/// the icon will still show a context menu on right click.
#[derive(Debug, Clone, Default, Serialize)]
#[serde(rename_all = "camelCase")]
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/webview/webview_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ impl<R: Runtime> WebviewWindow<R> {
self.webview.window().set_maximizable(maximizable)
}

/// Determines if this window's native minize button should be enabled.
/// Determines if this window's native minimize button should be enabled.
///
/// ## Platform-specific
///
Expand Down
2 changes: 1 addition & 1 deletion core/tauri/src/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ impl<R: Runtime> Window<R> {
.map_err(Into::into)
}

/// Determines if this window's native minize button should be enabled.
/// Determines if this window's native minimize button should be enabled.
///
/// ## Platform-specific
///
Expand Down
2 changes: 1 addition & 1 deletion examples/api/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default defineConfig({
}
},

// Vite optons tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// prevent vite from obscuring rust errors
clearScreen: false,
// tauri expects a fixed port, fail if that port is not available
Expand Down
2 changes: 1 addition & 1 deletion tooling/api/src/menu/predefinedMenuItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export interface PredefinedMenuItemOptions {
}
}

/** A predefined (native) menu item which has a predfined behavior by the OS or by tauri. */
/** A predefined (native) menu item which has a predefined behavior by the OS or by tauri. */
export class PredefinedMenuItem extends MenuItemBase {
/** @ignore */
protected constructor(rid: number, id: string) {
Expand Down
4 changes: 2 additions & 2 deletions tooling/api/src/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Image, transformImage } from './image'
*
* #### Platform-specific:
*
* - **Linux**: Unsupported. The event is not emmited even though the icon is shown,
* - **Linux**: Unsupported. The event is not emitted even though the icon is shown,
* the icon will still show a context menu on right click.
*/
export interface TrayIconEvent {
Expand Down Expand Up @@ -45,7 +45,7 @@ export interface TrayIconEvent {

/** {@link TrayIcon.new|`TrayIcon`} creation options */
export interface TrayIconOptions {
/** The tray icon id. If undefined, a random one will be assigend */
/** The tray icon id. If undefined, a random one will be assigned */
id?: string
/** The tray icon menu */
menu?: Menu | Submenu
Expand Down
4 changes: 2 additions & 2 deletions tooling/api/src/webviewWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class WebviewWindow {
}

/**
* Listen to an emitted event on this webivew window only once.
* Listen to an emitted event on this webview window only once.
*
* @example
* ```typescript
Expand Down Expand Up @@ -203,7 +203,7 @@ class WebviewWindow {
// Order matters, we use window APIs by default
applyMixins(WebviewWindow, [Window, Webview])

/** Extends a base class by other specifed classes, wihtout overriding existing properties */
/** Extends a base class by other specified classes, without overriding existing properties */
function applyMixins(
baseClass: { prototype: unknown },
extendedClasses: unknown
Expand Down
4 changes: 2 additions & 2 deletions tooling/bundler/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<Bundle>> {
PackageType::MacOsBundle => macos::app::bundle_project(&settings)?,
#[cfg(target_os = "macos")]
PackageType::IosBundle => macos::ios::bundle_project(&settings)?,
// dmg is dependant of MacOsBundle, we send our bundles to prevent rebuilding
// dmg is dependent of MacOsBundle, we send our bundles to prevent rebuilding
#[cfg(target_os = "macos")]
PackageType::Dmg => {
let bundled = macos::dmg::bundle_project(&settings, &bundles)?;
Expand All @@ -122,7 +122,7 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<Bundle>> {
#[cfg(target_os = "linux")]
PackageType::AppImage => linux::appimage::bundle_project(&settings)?,

// updater is dependant of multiple bundle, we send our bundles to prevent rebuilding
// updater is dependent of multiple bundle, we send our bundles to prevent rebuilding
PackageType::Updater => {
if !package_types.iter().any(|p| {
matches!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
; !insertmacro APP_ASSOCIATE "txt" "myapp.textfile" "Description of txt files" \
; "$INSTDIR\myapp.exe,0" "Open with myapp" "$INSTDIR\myapp.exe $\"%1$\""
;
; Never insert the APP_ASSOCIATE macro multiple times, it is only ment
; Never insert the APP_ASSOCIATE macro multiple times, it is only meant
; to associate an application with a single file and using the
; the "open" verb as default. To add more verbs (actions) to a file
; use the APP_ASSOCIATE_ADDVERB macro.
Expand Down

0 comments on commit 26f0f71

Please sign in to comment.