Skip to content

Commit a29b995

Browse files
committed
Inline argument
1 parent 36f0544 commit a29b995

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ impl<'a> Cfg<'a> {
534534
&self,
535535
) -> Result<Option<(LocalToolchainName, ActiveReason)>> {
536536
Ok(
537-
if let Some((override_config, reason)) = self.find_override_config(&self.current_dir)? {
537+
if let Some((override_config, reason)) = self.find_override_config()? {
538538
Some((override_config.into_local_toolchain_name(), reason))
539539
} else {
540540
self.get_default()?
@@ -543,7 +543,7 @@ impl<'a> Cfg<'a> {
543543
)
544544
}
545545

546-
fn find_override_config(&self, path: &Path) -> Result<Option<(OverrideCfg, ActiveReason)>> {
546+
fn find_override_config(&self) -> Result<Option<(OverrideCfg, ActiveReason)>> {
547547
let override_config: Option<(OverrideCfg, ActiveReason)> =
548548
// First check +toolchain override from the command line
549549
if let Some(ref name) = self.toolchain_override {
@@ -562,7 +562,7 @@ impl<'a> Cfg<'a> {
562562
// directory in the override database, or a `rust-toolchain{.toml}` file,
563563
// in that order.
564564
else if let Some((override_cfg, active_reason)) = self.settings_file.with(|s| {
565-
self.find_override_from_dir_walk(path, s)
565+
self.find_override_from_dir_walk(&self.current_dir, s)
566566
})? {
567567
Some((override_cfg, active_reason))
568568
}
@@ -755,7 +755,7 @@ impl<'a> Cfg<'a> {
755755

756756
#[cfg_attr(feature = "otel", tracing::instrument(skip_all))]
757757
async fn find_or_install_active_toolchain(&'a self) -> Result<(Toolchain<'a>, ActiveReason)> {
758-
match self.find_override_config(&self.current_dir)? {
758+
match self.find_override_config()? {
759759
Some((override_config, reason)) => match override_config {
760760
OverrideCfg::PathBased(path_based_name) => {
761761
let toolchain = Toolchain::with_reason(self, path_based_name.into(), &reason)?;

0 commit comments

Comments
 (0)