summaryrefslogtreecommitdiffstats
path: root/tokio-fs
diff options
context:
space:
mode:
authorTaiki Endo <te316e89@gmail.com>2019-07-21 02:43:19 +0900
committerCarl Lerche <me@carllerche.com>2019-07-20 10:43:19 -0700
commit9af07ce208059994b32117b248cc544803a13256 (patch)
tree09bebbc116f55efe697a5ee6606c357be7c6f075 /tokio-fs
parent1b2d997863709a3d5cb1e2dc78048d7e6566a17f (diff)
chore: remove redundant field names in struct literals (#1334)
Diffstat (limited to 'tokio-fs')
-rw-r--r--tokio-fs/src/create_dir.rs2
-rw-r--r--tokio-fs/src/create_dir_all.rs2
-rw-r--r--tokio-fs/src/hard_link.rs2
-rw-r--r--tokio-fs/src/os/unix.rs2
-rw-r--r--tokio-fs/src/os/windows/symlink_dir.rs2
-rw-r--r--tokio-fs/src/os/windows/symlink_file.rs2
-rw-r--r--tokio-fs/src/read_dir.rs2
-rw-r--r--tokio-fs/src/read_link.rs2
-rw-r--r--tokio-fs/src/remove_dir.rs2
-rw-r--r--tokio-fs/src/remove_file.rs2
-rw-r--r--tokio-fs/src/rename.rs2
-rw-r--r--tokio-fs/src/set_permissions.rs5
12 files changed, 12 insertions, 15 deletions
diff --git a/tokio-fs/src/create_dir.rs b/tokio-fs/src/create_dir.rs
index f691a2b9..9f245dc4 100644
--- a/tokio-fs/src/create_dir.rs
+++ b/tokio-fs/src/create_dir.rs
@@ -30,7 +30,7 @@ where
P: AsRef<Path>,
{
fn new(path: P) -> CreateDirFuture<P> {
- CreateDirFuture { path: path }
+ CreateDirFuture { path }
}
}
diff --git a/tokio-fs/src/create_dir_all.rs b/tokio-fs/src/create_dir_all.rs
index d9a84eb2..37e675be 100644
--- a/tokio-fs/src/create_dir_all.rs
+++ b/tokio-fs/src/create_dir_all.rs
@@ -31,7 +31,7 @@ where
P: AsRef<Path>,
{
fn new(path: P) -> CreateDirAllFuture<P> {
- CreateDirAllFuture { path: path }
+ CreateDirAllFuture { path }
}
}
diff --git a/tokio-fs/src/hard_link.rs b/tokio-fs/src/hard_link.rs
index e18bac17..39ee90b5 100644
--- a/tokio-fs/src/hard_link.rs
+++ b/tokio-fs/src/hard_link.rs
@@ -36,7 +36,7 @@ where
Q: AsRef<Path>,
{
fn new(src: P, dst: Q) -> HardLinkFuture<P, Q> {
- HardLinkFuture { src: src, dst: dst }
+ HardLinkFuture { src, dst }
}
}
diff --git a/tokio-fs/src/os/unix.rs b/tokio-fs/src/os/unix.rs
index b6f8e0be..e8e222f2 100644
--- a/tokio-fs/src/os/unix.rs
+++ b/tokio-fs/src/os/unix.rs
@@ -36,7 +36,7 @@ where
Q: AsRef<Path>,
{
fn new(src: P, dst: Q) -> SymlinkFuture<P, Q> {
- SymlinkFuture { src: src, dst: dst }
+ SymlinkFuture { src, dst }
}
}
diff --git a/tokio-fs/src/os/windows/symlink_dir.rs b/tokio-fs/src/os/windows/symlink_dir.rs
index e322deb9..a9181396 100644
--- a/tokio-fs/src/os/windows/symlink_dir.rs
+++ b/tokio-fs/src/os/windows/symlink_dir.rs
@@ -35,7 +35,7 @@ where
Q: AsRef<Path>,
{
fn new(src: P, dst: Q) -> SymlinkDirFuture<P, Q> {
- SymlinkDirFuture { src: src, dst: dst }
+ SymlinkDirFuture { src, dst }
}
}
diff --git a/tokio-fs/src/os/windows/symlink_file.rs b/tokio-fs/src/os/windows/symlink_file.rs
index afd6b229..42d1563a 100644
--- a/tokio-fs/src/os/windows/symlink_file.rs
+++ b/tokio-fs/src/os/windows/symlink_file.rs
@@ -35,7 +35,7 @@ where
Q: AsRef<Path>,
{
fn new(src: P, dst: Q) -> SymlinkFileFuture<P, Q> {
- SymlinkFileFuture { src: src, dst: dst }
+ SymlinkFileFuture { src, dst }
}
}
diff --git a/tokio-fs/src/read_dir.rs b/tokio-fs/src/read_dir.rs
index 9585518b..cf93903e 100644
--- a/tokio-fs/src/read_dir.rs
+++ b/tokio-fs/src/read_dir.rs
@@ -37,7 +37,7 @@ where
P: AsRef<Path> + Send + 'static,
{
fn new(path: P) -> ReadDirFuture<P> {
- ReadDirFuture { path: path }
+ ReadDirFuture { path }
}
}
diff --git a/tokio-fs/src/read_link.rs b/tokio-fs/src/read_link.rs
index 980f922e..3898267f 100644
--- a/tokio-fs/src/read_link.rs
+++ b/tokio-fs/src/read_link.rs
@@ -30,7 +30,7 @@ where
P: AsRef<Path>,
{
fn new(path: P) -> ReadLinkFuture<P> {
- ReadLinkFuture { path: path }
+ ReadLinkFuture { path }
}
}
diff --git a/tokio-fs/src/remove_dir.rs b/tokio-fs/src/remove_dir.rs
index 3e666c68..0281ba91 100644
--- a/tokio-fs/src/remove_dir.rs
+++ b/tokio-fs/src/remove_dir.rs
@@ -30,7 +30,7 @@ where
P: AsRef<Path>,
{
fn new(path: P) -> RemoveDirFuture<P> {
- RemoveDirFuture { path: path }
+ RemoveDirFuture { path }
}
}
diff --git a/tokio-fs/src/remove_file.rs b/tokio-fs/src/remove_file.rs
index b09eae77..9eaa7929 100644
--- a/tokio-fs/src/remove_file.rs
+++ b/tokio-fs/src/remove_file.rs
@@ -34,7 +34,7 @@ where
P: AsRef<Path>,
{
fn new(path: P) -> RemoveFileFuture<P> {
- RemoveFileFuture { path: path }
+ RemoveFileFuture { path }
}
}
diff --git a/tokio-fs/src/rename.rs b/tokio-fs/src/rename.rs
index 670a9c7d..e766a826 100644
--- a/tokio-fs/src/rename.rs
+++ b/tokio-fs/src/rename.rs
@@ -36,7 +36,7 @@ where
Q: AsRef<Path>,
{
fn new(from: P, to: Q) -> RenameFuture<P, Q> {
- RenameFuture { from: from, to: to }
+ RenameFuture { from, to }
}
}
diff --git a/tokio-fs/src/set_permissions.rs b/tokio-fs/src/set_permissions.rs
index e91c33b8..fb8e97a3 100644
--- a/tokio-fs/src/set_permissions.rs
+++ b/tokio-fs/src/set_permissions.rs
@@ -31,10 +31,7 @@ where
P: AsRef<Path>,
{
fn new(path: P, perm: fs::Permissions) -> SetPermissionsFuture<P> {
- SetPermissionsFuture {
- path: path,
- perm: perm,
- }
+ SetPermissionsFuture { path, perm }
}
}