This commit is contained in:
Wez Furlong committed 2020-01-05 15:14:32 -08:00
1 parent 89f2023577
commit 4687b3bb48
6 files changed
+9 -5

No files matched your search

+4 -2
View File
@@ -1,3 +1,4 @@
#![cfg_attr(feature = "cargo-clippy", allow(clippy::range_plus_one))]
use super::quad::*;
use super::renderstate::*;
use super::utilsprites::RenderMetrics;
@@ -219,7 +220,7 @@ impl WindowCallbacks for TermWindow {
log::trace!("Setting focus to {:?}", focused);
self.focused = if focused { Some(Instant::now()) } else { None };
if !self.focused.is_some() {
if self.focused.is_none() {
self.last_mouse_click = None;
self.current_mouse_button = None;
}
@@ -1646,6 +1647,7 @@ impl TermWindow {
/// This is nominally a matter of setting the fg/bg color and the
/// texture coordinates for a given glyph. There's a little bit
/// of extra complexity to deal with multi-cell glyphs.
#[allow(clippy::too_many_arguments)]
fn render_screen_line_opengl(
&self,
line_idx: usize,
@@ -2254,7 +2256,7 @@ impl TermWindow {
}
fn get_viewport(&mut self, tab_id: TabId) -> Option<StableRowIndex> {
self.tab_state(tab_id).viewport.clone()
self.tab_state(tab_id).viewport
}
fn set_viewport(
+1 -1
View File
@@ -83,7 +83,7 @@ impl Tab for LocalTab {
}
fn palette(&self) -> ColorPalette {
self.terminal.borrow().palette().clone()
self.terminal.borrow().palette()
}
fn domain_id(&self) -> DomainId {
+1
View File
@@ -9,6 +9,7 @@
//! of this code; in this way the client and server can more gracefully
//! manage unknown enum variants.
#![allow(dead_code)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::range_plus_one))]
use crate::mux::domain::DomainId;
use crate::mux::renderable::{RenderableDimensions, StableCursorPosition};
+1 -1
View File
@@ -114,7 +114,7 @@ impl Recorder for Stats {
let mut inner = self.inner.lock().unwrap();
let histogram = inner
.histograms
.entry(key.clone())
.entry(key)
.or_insert_with(|| Histogram::new(2).expect("failed to crate new Histogram"));
histogram.record(value).ok();
}
+1 -1
View File
@@ -116,7 +116,7 @@ impl Renderable for RenderableState {
if inner.something_changed.load(Ordering::SeqCst)
|| inner.surface.has_changes(inner.local_sequence)
{
lines.into_iter().collect()
lines.collect()
} else {
vec![]
}
+1
View File
@@ -1,3 +1,4 @@
#![cfg_attr(feature = "cargo-clippy", allow(clippy::range_plus_one))]
use super::*;
use log::debug;
use std::collections::VecDeque;