From 63dde640036fe0c10e923ee57b32f519fb05ef90 Mon Sep 17 00:00:00 2001 From: kitsunecafe Date: Sat, 28 Sep 2024 03:08:08 -0500 Subject: [PATCH] use impl instead of generic syntax --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 6299f21..b3f8787 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use std::{ use clap::Parser; use rand::distributions::{Alphanumeric, DistString}; -fn rename_or_copy, Q: AsRef>(from: P, to: Q) -> io::Result<()> { +fn rename_or_copy(from: impl AsRef, to: impl AsRef) -> io::Result<()> { match fs::rename(&from, &to) { Ok(result) => Ok(result), Err(_) => {