Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Sep 27, 2024
1 parent 70ab82f commit e013638
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions objdiff-gui/src/views/function_diff.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::default::Default;

use egui::{epaint::color, text::LayoutJob, Align, Label, Layout, Response, Sense, Vec2, Widget};
use egui::{text::LayoutJob, Align, Label, Layout, Response, Sense, Vec2, Widget};
use egui_extras::{Column, TableBuilder, TableRow};
use objdiff_core::{
arch::ObjArch,
Expand All @@ -25,19 +25,19 @@ enum ColumnId {

#[derive(Default)]
pub struct FunctionViewState {
pub left_highlight: HighlightKind,
pub right_highlight: HighlightKind,
left_highlight: HighlightKind,
right_highlight: HighlightKind,
}

impl FunctionViewState {
pub fn highlight(&self, column: ColumnId) -> &HighlightKind {
fn highlight(&self, column: ColumnId) -> &HighlightKind {
match column {
ColumnId::Left => &self.left_highlight,
ColumnId::Right => &self.right_highlight,
}
}

pub fn set_highlight(&mut self, column: ColumnId, highlight: HighlightKind) {
fn set_highlight(&mut self, column: ColumnId, highlight: HighlightKind) {
match column {
ColumnId::Left => {
if highlight == self.left_highlight {
Expand Down Expand Up @@ -218,6 +218,7 @@ fn find_symbol(obj: &ObjInfo, selected_symbol: &SymbolRefByName) -> Option<Symbo
None
}

#[allow(clippy::too_many_arguments)]
fn diff_text_ui(
ui: &mut egui::Ui,
text: DiffText<'_>,
Expand Down

0 comments on commit e013638

Please sign in to comment.