Skip to content

Commit

Permalink
types: change type for function params (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoaldamav authored Nov 2, 2023
1 parent b296c8c commit 09ed19d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use platform::windows::reflink_sync;
#[cfg(not(target_os = "windows"))]
use reflink_copy::reflink as reflink_sync;

pub fn reflink_file_sync(src: &str, dest: &str) -> std::io::Result<()> {
pub fn reflink_file_sync(src: impl AsRef<str>, dest: impl AsRef<str>) -> std::io::Result<()> {
// Convert to absolute paths
let src_abs: PathBuf = absolute(src)?;
let dest_abs: PathBuf = absolute(dest)?;
let src_abs: PathBuf = absolute(src.as_ref())?;
let dest_abs: PathBuf = absolute(dest.as_ref())?;

#[cfg(target_os = "windows")]
{
Expand Down

0 comments on commit 09ed19d

Please sign in to comment.