Skip to content

Commit

Permalink
cleanup: fix minor typos in function names
Browse files Browse the repository at this point in the history
> error: `mutliple` should be `multiple`
> error: `visble` should be `visible`

Found via typos:
- https://github.com/crate-ci/typos
  • Loading branch information
elasticdog committed May 25, 2023
1 parent d087e64 commit d10af40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/src/revset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1986,7 +1986,7 @@ impl VisibilityResolutionContext<'_> {
// but if it does, the heads set could be extended to include the commits
// (and `remote_branches()`) specified in the revset expression. Alternatively,
// some optimization rules could be removed, but that means `author(_) & x`
// would have to test `:visble_heads() & x`.
// would have to test `:visible_heads() & x`.
ResolvedExpression::Ancestors {
heads: self.resolve_visible_heads().into(),
generation: GENERATION_RANGE_FULL,
Expand Down
2 changes: 1 addition & 1 deletion src/cli_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ pub fn resolve_multiple_nonempty_revsets(
Ok(acc)
}

pub fn resolve_mutliple_nonempty_revsets_flag_guarded(
pub fn resolve_multiple_nonempty_revsets_flag_guarded(
workspace_command: &WorkspaceCommandHelper,
revisions: &[RevisionArg],
allow_plural_revsets: bool,
Expand Down
8 changes: 4 additions & 4 deletions src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use maplit::{hashmap, hashset};

use crate::cli_util::{
check_stale_working_copy, get_config_file_path, print_checkout_stats,
resolve_multiple_nonempty_revsets, resolve_mutliple_nonempty_revsets_flag_guarded,
resolve_multiple_nonempty_revsets, resolve_multiple_nonempty_revsets_flag_guarded,
run_ui_editor, serialize_config_value, short_commit_hash, user_error, user_error_with_hint,
write_config_value_to_file, Args, CommandError, CommandHelper, DescriptionArg,
LogContentFormat, RevisionArg, WorkspaceCommandHelper,
Expand Down Expand Up @@ -2051,7 +2051,7 @@ fn resolve_destination_revs(
revisions: &[RevisionArg],
allow_plural_revsets: bool,
) -> Result<IndexSet<Commit>, CommandError> {
let commits = resolve_mutliple_nonempty_revsets_flag_guarded(
let commits = resolve_multiple_nonempty_revsets_flag_guarded(
workspace_command,
revisions,
allow_plural_revsets,
Expand Down Expand Up @@ -2889,7 +2889,7 @@ fn cmd_rebase(ui: &mut Ui, command: &CommandHelper, args: &RebaseArgs) -> Result
if let Some(rev_str) = &args.revision {
rebase_revision(ui, command, &mut workspace_command, &new_parents, rev_str)?;
} else if !args.source.is_empty() {
let source_commits = resolve_mutliple_nonempty_revsets_flag_guarded(
let source_commits = resolve_multiple_nonempty_revsets_flag_guarded(
&workspace_command,
&args.source,
args.allow_large_revsets,
Expand All @@ -2905,7 +2905,7 @@ fn cmd_rebase(ui: &mut Ui, command: &CommandHelper, args: &RebaseArgs) -> Result
let branch_commits = if args.branch.is_empty() {
IndexSet::from([workspace_command.resolve_single_rev("@")?])
} else {
resolve_mutliple_nonempty_revsets_flag_guarded(
resolve_multiple_nonempty_revsets_flag_guarded(
&workspace_command,
&args.branch,
args.allow_large_revsets,
Expand Down

0 comments on commit d10af40

Please sign in to comment.