fs: remove unnecessary trait and lifetime bounds (#1655)

This commit is contained in:
Taiki Endo 2019-10-15 19:02:34 +09:00 committed by GitHub
parent 1cae04f8b3
commit 4c97e9dc28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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<P>(path: P) -> io::Result<ReadDir>
where
P: AsRef<Path> + Send + 'static,
P: AsRef<Path>,
{
let path = path.as_ref().to_owned();
let std = asyncify(|| std::fs::read_dir(path)).await?;

View File

@ -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<P>(path: P) -> io::Result<Metadata>
where
P: AsRef<Path> + Send + 'static,
P: AsRef<Path>,
{
let path = path.as_ref().to_owned();
asyncify(|| std::fs::symlink_metadata(path)).await

View File

@ -19,7 +19,7 @@ use std::{io, path::Path};
/// ```
pub async fn write<P, C: AsRef<[u8]> + Unpin>(path: P, contents: C) -> io::Result<()>
where
P: AsRef<Path> + Send + Unpin + 'static,
P: AsRef<Path>,
{
let path = path.as_ref().to_owned();
let contents = contents.as_ref().to_owned();