diff options
| author | bors <bors@rust-lang.org> | 2016-02-19 13:49:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-02-19 13:49:46 +0000 |
| commit | 28a3e8bb51cdeda4ee73296b827bfb208a0bff5b (patch) | |
| tree | 94d2ff135c6ac5832f248c955ad25395909867c2 /src/libterm | |
| parent | d5e2e5fbbc4b856af4a5146b1b5887f58a8256ad (diff) | |
| parent | 5850d16d52957095c06a78f101c3508f2f4b9d9d (diff) | |
Auto merge of #31742 - frewsxcv:needless-lifetimes, r=pnkfelix
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
Diffstat (limited to 'src/libterm')
| -rw-r--r-- | src/libterm/lib.rs | 4 | ||||
| -rw-r--r-- | src/libterm/terminfo/mod.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 771e2470455..01daa938142 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -211,10 +211,10 @@ pub trait Terminal: Write { fn reset(&mut self) -> io::Result<bool>; /// Gets an immutable reference to the stream inside - fn get_ref<'a>(&'a self) -> &'a Self::Output; + fn get_ref(&self) -> &Self::Output; /// Gets a mutable reference to the stream inside - fn get_mut<'a>(&'a mut self) -> &'a mut Self::Output; + fn get_mut(&mut self) -> &mut Self::Output; /// Returns the contained stream, destroying the `Terminal` fn into_inner(self) -> Self::Output where Self: Sized; diff --git a/src/libterm/terminfo/mod.rs b/src/libterm/terminfo/mod.rs index 04486132c84..e54f763fd0d 100644 --- a/src/libterm/terminfo/mod.rs +++ b/src/libterm/terminfo/mod.rs @@ -205,11 +205,11 @@ impl<T: Write + Send> Terminal for TerminfoTerminal<T> { self.out.write_all(&cmd).and(Ok(true)) } - fn get_ref<'a>(&'a self) -> &'a T { + fn get_ref(&self) -> &T { &self.out } - fn get_mut<'a>(&'a mut self) -> &'a mut T { + fn get_mut(&mut self) -> &mut T { &mut self.out } |
