mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-21 11:20:03 +00:00
dep: Upgrade transitive dependencies (#2154)
* dep: Upgrade transitive dependencies * Simplify download.rs using io::Error::other Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix utils.rs in io::Error::other Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix typo in download.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Use io::Error::other in errors.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Use TempDir::keep instead of deprecated into_path in entry.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Use io::Error::other in gh_token.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fmt gh_token.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fmt utils.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
277269fc8e
commit
8d438736eb
6 changed files with 100 additions and 154 deletions
|
@ -527,7 +527,7 @@ fn do_install_fetches(
|
|||
|
||||
if no_cleanup {
|
||||
// Consume temp_dir without removing it from fs.
|
||||
let _ = temp_dir.into_path();
|
||||
let _ = temp_dir.keep();
|
||||
} else {
|
||||
temp_dir.close().unwrap_or_else(|err| {
|
||||
warn!("Failed to clean up some resources: {err}");
|
||||
|
@ -577,7 +577,7 @@ fn do_install_fetches_continue_on_failure(
|
|||
|
||||
if no_cleanup {
|
||||
// Consume temp_dir without removing it from fs.
|
||||
let _ = temp_dir.into_path();
|
||||
let _ = temp_dir.keep();
|
||||
} else {
|
||||
temp_dir.close().unwrap_or_else(|err| {
|
||||
warn!("Failed to clean up some resources: {err}");
|
||||
|
|
|
@ -27,12 +27,7 @@ pub(super) async fn get() -> io::Result<Zeroizing<Box<str>>> {
|
|||
.strip_prefix("password=")
|
||||
.map(|token| Zeroizing::new(token.into()))
|
||||
})
|
||||
.ok_or_else(|| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
"Password not found in `git credential fill` output",
|
||||
)
|
||||
})
|
||||
.ok_or_else(|| io::Error::other("Password not found in `git credential fill` output"))
|
||||
}
|
||||
|
||||
trait CommandExt {
|
||||
|
@ -86,10 +81,10 @@ impl CommandExt for Command {
|
|||
} else {
|
||||
zeroize_and_drop(stdout);
|
||||
|
||||
Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("`{:?}` process exited with `{status}`", self.as_std()),
|
||||
))
|
||||
Err(io::Error::other(format!(
|
||||
"`{:?}` process exited with `{status}`",
|
||||
self.as_std()
|
||||
)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue