1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-20 15:17:07 +00:00

no need for mut self for now method

This commit is contained in:
Nikolay Kim 2018-10-29 15:40:10 -07:00
parent a8a831a098
commit 3d51aa7115
2 changed files with 2 additions and 2 deletions

View file

@ -77,7 +77,7 @@ impl<R, E, F> KeepAliveService<R, E, F>
where
F: Fn() -> E,
{
pub fn new(ka: Duration, mut timer: LowResTimerService, f: F) -> Self {
pub fn new(ka: Duration, timer: LowResTimerService, f: F) -> Self {
let expire = timer.now() + ka;
KeepAliveService {
f,

View file

@ -66,7 +66,7 @@ impl LowResTimerService {
/// Get current time. This function has to be called from
/// future's poll method, otherwise it panics.
pub fn now(&mut self) -> Instant {
pub fn now(&self) -> Instant {
let cur = self.0.borrow().current.clone();
if let Some(cur) = cur {
cur