Skip to content

Commit

Permalink
Make all src functions and structs crate-private
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>

Fmt code

Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 authored and Darunada committed Feb 25, 2023
1 parent 6745cd9 commit c2a5ec7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,11 @@ impl Cfg {
}
}

<<<<<<< HEAD
pub(crate) fn which_binary(&self, path: &Path, binary: &str) -> Result<PathBuf> {
=======
pub(crate) fn which_binary(&self, path: &Path, binary: &str) -> Result<Option<PathBuf>> {
>>>>>>> 2fcb8beb (Make all src functions and structs crate-private)
let (toolchain, _) = self.find_or_install_override_toolchain_or_default(path)?;
Ok(toolchain.binary_file(binary))
}
Expand Down Expand Up @@ -1008,9 +1012,13 @@ impl Cfg {
}

pub(crate) fn resolve_toolchain(&self, name: &str) -> Result<String> {
<<<<<<< HEAD
// remove trailing slashes in toolchain name
let normalized_name = name.trim_end_matches('/');
if let Ok(desc) = dist::PartialToolchainDesc::from_str(normalized_name) {
=======
if let Ok(desc) = dist::PartialToolchainDesc::from_str(name) {
>>>>>>> 2fcb8beb (Make all src functions and structs crate-private)
let host = self.get_default_host_triple()?;
Ok(desc.resolve(&host)?.to_string())
} else {
Expand Down

0 comments on commit c2a5ec7

Please sign in to comment.