mirror of https://github.com/encounter/objdiff.git
clippy fixes
This commit is contained in:
parent
70ab82f1f7
commit
e013638c5a
|
@ -1,6 +1,6 @@
|
||||||
use std::default::Default;
|
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 egui_extras::{Column, TableBuilder, TableRow};
|
||||||
use objdiff_core::{
|
use objdiff_core::{
|
||||||
arch::ObjArch,
|
arch::ObjArch,
|
||||||
|
@ -25,19 +25,19 @@ enum ColumnId {
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct FunctionViewState {
|
pub struct FunctionViewState {
|
||||||
pub left_highlight: HighlightKind,
|
left_highlight: HighlightKind,
|
||||||
pub right_highlight: HighlightKind,
|
right_highlight: HighlightKind,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FunctionViewState {
|
impl FunctionViewState {
|
||||||
pub fn highlight(&self, column: ColumnId) -> &HighlightKind {
|
fn highlight(&self, column: ColumnId) -> &HighlightKind {
|
||||||
match column {
|
match column {
|
||||||
ColumnId::Left => &self.left_highlight,
|
ColumnId::Left => &self.left_highlight,
|
||||||
ColumnId::Right => &self.right_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 {
|
match column {
|
||||||
ColumnId::Left => {
|
ColumnId::Left => {
|
||||||
if highlight == self.left_highlight {
|
if highlight == self.left_highlight {
|
||||||
|
@ -218,6 +218,7 @@ fn find_symbol(obj: &ObjInfo, selected_symbol: &SymbolRefByName) -> Option<Symbo
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
fn diff_text_ui(
|
fn diff_text_ui(
|
||||||
ui: &mut egui::Ui,
|
ui: &mut egui::Ui,
|
||||||
text: DiffText<'_>,
|
text: DiffText<'_>,
|
||||||
|
|
Loading…
Reference in New Issue