use impl instead of generic syntax
This commit is contained in:
parent
7ea0b26930
commit
63dde64003
|
@ -6,7 +6,7 @@ use std::{
|
|||
use clap::Parser;
|
||||
use rand::distributions::{Alphanumeric, DistString};
|
||||
|
||||
fn rename_or_copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()> {
|
||||
fn rename_or_copy(from: impl AsRef<Path>, to: impl AsRef<Path>) -> io::Result<()> {
|
||||
match fs::rename(&from, &to) {
|
||||
Ok(result) => Ok(result),
|
||||
Err(_) => {
|
||||
|
|
Loading…
Reference in a new issue