diff options
author | Joe Wilm <jwilm@users.noreply.github.com> | 2018-12-10 09:53:56 -0800 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-12-10 17:53:56 +0000 |
commit | 217ad9ec285b4923de1790b0976c8c793039c994 (patch) | |
tree | 440e0d6d35f119246d2b113fd01b431f4f9c2c38 /src/meter.rs | |
parent | 7ab0b448479c9705fa14003bda97040630710b7a (diff) | |
download | alacritty-217ad9ec285b4923de1790b0976c8c793039c994.tar.gz alacritty-217ad9ec285b4923de1790b0976c8c793039c994.zip |
Upgrade to Rust 2018
This resolves a lot of NLL issues, however full NLL will be necessary to
handle a couple of remaining issues.
Diffstat (limited to 'src/meter.rs')
-rw-r--r-- | src/meter.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/meter.rs b/src/meter.rs index 1b6003db..32650e4d 100644 --- a/src/meter.rs +++ b/src/meter.rs @@ -75,9 +75,7 @@ impl<'a> Sampler<'a> { impl<'a> Drop for Sampler<'a> { fn drop(&mut self) { - // Work around borrowck - let duration = self.alive_duration(); - self.meter.add_sample(duration); + self.meter.add_sample(self.alive_duration()); } } @@ -88,7 +86,7 @@ impl Meter { } /// Get a sampler - pub fn sampler(&mut self) -> Sampler { + pub fn sampler(&mut self) -> Sampler<'_> { Sampler::new(self) } |