Skip to content

Commit 753587b

Browse files
committed
Simplify struct creation
1 parent 35df14f commit 753587b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl Pin {
161161
///
162162
/// This function does not export the provided pin_num.
163163
pub fn new(pin_num: u64) -> Pin {
164-
Pin { pin_num: pin_num }
164+
Pin { pin_num }
165165
}
166166

167167
/// Create a new Pin with the provided path
@@ -568,9 +568,9 @@ impl PinPoller {
568568

569569
match epoll_ctl(epoll_fd, EpollOp::EpollCtlAdd, devfile_fd, &mut event) {
570570
Ok(_) => Ok(PinPoller {
571-
pin_num: pin_num,
572-
devfile: devfile,
573-
epoll_fd: epoll_fd,
571+
pin_num,
572+
devfile,
573+
epoll_fd,
574574
}),
575575
Err(err) => {
576576
let _ = close(epoll_fd); // cleanup

0 commit comments

Comments
 (0)