Skip to content

Commit

Permalink
Commit from GitHub Actions (rtx)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 7, 2023
1 parent 8f007d5 commit 9a58145
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cli/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub fn local(
}

if !runtime.is_empty() {
let runtimes = ToolArg::double_tool_condition(&runtime.clone());
let runtimes = ToolArg::double_tool_condition(&runtime);
if cf.display_runtime(out, &runtimes)? {
return Ok(());
}
Expand Down
4 changes: 2 additions & 2 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ impl Client {
T: serde::de::DeserializeOwned,
{
let url = url.into_url().unwrap();
let resp = self.get(url.clone())?;
let resp = self.get(url)?;
let json = resp.json()?;
Ok(json)
}

pub fn download_file<U: IntoUrl>(&self, url: U, path: &Path) -> Result<()> {
let url = url.into_url()?;
debug!("GET Downloading {} to {}", &url, display_path(path));
let mut resp = self.get(url.clone())?;
let mut resp = self.get(url)?;

file::create_dir_all(path.parent().unwrap())?;
let mut file = File::create(path)?;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/core/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl JavaPlugin {
.find(|e| e.as_ref().unwrap().file_type().unwrap().is_dir())
.unwrap()?
.path();
let contents_dir = basedir.join("Contents").clone();
let contents_dir = basedir.join("Contents");
let source_dir = match m.vendor.as_str() {
"zulu" | "liberica" => basedir,
_ if os() == "macosx" => basedir.join("Contents").join("Home"),
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/core/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ impl Plugin for NodePlugin {
let body = body.trim().strip_prefix('v').unwrap_or(&body);
// replace lts/* with lts
let body = body.replace("lts/*", "lts");
Ok(body.to_string())
Ok(body)
}

fn install_version_impl(&self, ctx: &InstallContext) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/core/node_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl Plugin for NodeBuildPlugin {
let body = body.trim().strip_prefix('v').unwrap_or(&body);
// replace lts/* with lts
let body = body.replace("lts/*", "lts");
Ok(body.to_string())
Ok(body)
}

fn external_commands(&self) -> Result<Vec<Command>> {
Expand Down
2 changes: 1 addition & 1 deletion src/toolset/tool_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl ToolVersion {
latest_versions: bool,
) -> Result<Self> {
if !tool.is_installed() {
let tv = Self::new(tool, request.clone(), opts.clone(), request.version());
let tv = Self::new(tool, request.clone(), opts, request.version());
return Ok(tv);
}
let tv = match request.clone() {
Expand Down

0 comments on commit 9a58145

Please sign in to comment.