From 4c97e9dc285290b1586a3d216c9a25c9648d6d8e Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 15 Oct 2019 19:02:34 +0900 Subject: [PATCH] fs: remove unnecessary trait and lifetime bounds (#1655) --- tokio-fs/src/read_dir.rs | 2 +- tokio-fs/src/symlink_metadata.rs | 2 +- tokio-fs/src/write.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tokio-fs/src/read_dir.rs b/tokio-fs/src/read_dir.rs index 54c9345d8..9266ae730 100644 --- a/tokio-fs/src/read_dir.rs +++ b/tokio-fs/src/read_dir.rs @@ -19,7 +19,7 @@ use std::task::Poll; /// This is an async version of [`std::fs::read_dir`](std::fs::read_dir) pub async fn read_dir

(path: P) -> io::Result where - P: AsRef + Send + 'static, + P: AsRef, { let path = path.as_ref().to_owned(); let std = asyncify(|| std::fs::read_dir(path)).await?; diff --git a/tokio-fs/src/symlink_metadata.rs b/tokio-fs/src/symlink_metadata.rs index 411572d15..1ebcc1e62 100644 --- a/tokio-fs/src/symlink_metadata.rs +++ b/tokio-fs/src/symlink_metadata.rs @@ -11,7 +11,7 @@ use std::path::Path; /// [std]: https://doc.rust-lang.org/std/fs/fn.symlink_metadata.html pub async fn symlink_metadata

(path: P) -> io::Result where - P: AsRef + Send + 'static, + P: AsRef, { let path = path.as_ref().to_owned(); asyncify(|| std::fs::symlink_metadata(path)).await diff --git a/tokio-fs/src/write.rs b/tokio-fs/src/write.rs index 9eba86354..492c65fc9 100644 --- a/tokio-fs/src/write.rs +++ b/tokio-fs/src/write.rs @@ -19,7 +19,7 @@ use std::{io, path::Path}; /// ``` pub async fn write + Unpin>(path: P, contents: C) -> io::Result<()> where - P: AsRef + Send + Unpin + 'static, + P: AsRef, { let path = path.as_ref().to_owned(); let contents = contents.as_ref().to_owned();