From 2e3ffbe2db52d598ca374a3d77171bbd3a7ebfc5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 May 2021 20:20:58 +0100 Subject: [PATCH] timereader: Minor refactoring Signed-off-by: Ian Jackson --- src/timedread.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/timedread.rs b/src/timedread.rs index 122b59fd..1a6c6874 100644 --- a/src/timedread.rs +++ b/src/timedread.rs @@ -69,9 +69,9 @@ impl TimedFdReader { self.deadline = deadline; } pub fn set_timeout(&mut self, timeout: Option) { - self.deadline = timeout.map(|timeout|{ + self.set_deadline(timeout.map(|timeout|{ Instant::now() + timeout - }); + })); } } -- 2.30.2