fix warnings
This commit is contained in:
parent
0457d63bd0
commit
8a4df3307d
4 changed files with 3 additions and 10 deletions
|
|
@ -2,7 +2,7 @@ use regex::bytes::Regex;
|
|||
|
||||
use crate::tui::{
|
||||
log_viewer::{FieldMatcher, InputTarget, LogViewer},
|
||||
model::{LogEntry, pretty_print_value},
|
||||
model::LogEntry,
|
||||
};
|
||||
|
||||
pub enum MatcherValue {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ fn setup_terminal() -> io::Result<Terminal<CrosstermBackend<Stdout>>> {
|
|||
Terminal::new(CrosstermBackend::new(stdout))
|
||||
}
|
||||
|
||||
fn teardown_terminal(terminal: &mut Terminal<CrosstermBackend<Stdout>>) -> io::Result<()> {
|
||||
fn teardown_terminal(_terminal: &mut Terminal<CrosstermBackend<Stdout>>) -> io::Result<()> {
|
||||
let mut stdout = io::stdout();
|
||||
crossterm::terminal::disable_raw_mode()?;
|
||||
crossterm::execute!(stdout, LeaveAlternateScreen, DisableMouseCapture,)?;
|
||||
|
|
|
|||
|
|
@ -80,13 +80,6 @@ impl LogEntry {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get(&self, index: usize) -> Option<Rc<LogEntry>> {
|
||||
match self {
|
||||
LogEntry::Single { .. } => None,
|
||||
LogEntry::Sub { sub_entries, .. } => sub_entries.get(index).cloned(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn all_fields(&self) -> LogFields {
|
||||
match self {
|
||||
LogEntry::Single { raw } => raw.all_fields(),
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ macro_rules! generate_candidate {
|
|||
($_self: tt, $iter_method: ident, $forwards: expr) => {
|
||||
loop {
|
||||
let stack_len = $_self.stack.len();
|
||||
let (enclosing, top) = $_self.stack.last_mut().unwrap();
|
||||
let (_enclosing, top) = $_self.stack.last_mut().unwrap();
|
||||
if let Some((top, inline_depth)) = top.$iter_method() {
|
||||
// if we can find it in the top of stack iterator, neat!
|
||||
return Some((top, inline_depth));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue