Skip to content

Commit da54ba3

Browse files
committed
refactor(gctx): mergable -> mergeable
1 parent d58031b commit da54ba3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/cargo/util/context/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ impl GlobalContext {
10211021
return Ok(());
10221022
};
10231023

1024-
if is_nonmergable_list(&key) {
1024+
if is_nonmergeable_list(&key) {
10251025
output.clear();
10261026
}
10271027

@@ -2208,7 +2208,7 @@ impl ConfigValue {
22082208
let is_higher_priority = from.definition().is_higher_priority(self.definition());
22092209
match (self, from) {
22102210
(&mut CV::List(ref mut old, _), CV::List(ref mut new, _)) => {
2211-
if is_nonmergable_list(&parts) {
2211+
if is_nonmergeable_list(&parts) {
22122212
// Use whichever list is higher priority.
22132213
if force || is_higher_priority {
22142214
mem::swap(new, old);
@@ -2358,7 +2358,7 @@ impl ConfigValue {
23582358

23592359
/// List of which configuration lists cannot be merged.
23602360
/// Instead of merging, these the higher priority list replaces the lower priority list.
2361-
fn is_nonmergable_list(key: &ConfigKey) -> bool {
2361+
fn is_nonmergeable_list(key: &ConfigKey) -> bool {
23622362
key.matches("registry.credential-provider")
23632363
|| key.matches("registries.*.credential-provider")
23642364
|| key.matches("target.*.runner")

src/cargo/util/context/path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl ConfigRelativePath {
9898
/// to get the actual program.
9999
///
100100
/// **Note**: Any usage of this type in config needs to be listed in
101-
/// the `util::context::is_nonmergable_list` check to prevent list merging
101+
/// the `util::context::is_nonmergeable_list` check to prevent list merging
102102
/// from multiple config files.
103103
#[derive(Debug, Clone, PartialEq)]
104104
pub struct PathAndArgs {

tests/testsuite/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,7 @@ gitoxide = \"fetch\"
21812181
}
21822182

21832183
#[cargo_test]
2184-
fn nonmergable_lists() {
2184+
fn nonmergeable_lists() {
21852185
let root_path = paths::root().join(".cargo/config.toml");
21862186
write_config_at(
21872187
&root_path,

0 commit comments

Comments
 (0)