Skip to content

Commit

Permalink
chore: simplify reborrow
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Feb 8, 2025
1 parent 8afa07a commit c7b2e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn create_helper<R>(
) -> io::Result<R> {
// Make the path absolute. Otherwise, changing the current directory can invalidate a stored
// path (causing issues when cleaning up temporary files.
let mut base = &*base; // re-borrow to shrink lifetime
let mut base = base; // re-borrow to shrink lifetime
let base_path_storage; // slot to store the absolute path, if necessary.
if !base.is_absolute() {
let cur_dir = std::env::current_dir()?;
Expand Down

0 comments on commit c7b2e1a

Please sign in to comment.