mirror of
https://github.com/encounter/objdiff.git
synced 2025-12-14 15:46:31 +00:00
Migrate to Rust edition 2024
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use egui::{text::LayoutJob, Color32, FontFamily, FontId, TextFormat, TextStyle, Widget};
|
||||
use egui::{Color32, FontFamily, FontId, TextFormat, TextStyle, Widget, text::LayoutJob};
|
||||
use time::UtcOffset;
|
||||
|
||||
use crate::fonts::load_font_if_needed;
|
||||
|
||||
@@ -5,17 +5,17 @@ use std::{mem::take, path::MAIN_SEPARATOR};
|
||||
#[cfg(all(windows, feature = "wsl"))]
|
||||
use anyhow::{Context, Result};
|
||||
use egui::{
|
||||
output::OpenUrl, text::LayoutJob, CollapsingHeader, FontFamily, FontId, RichText,
|
||||
SelectableLabel, TextFormat, Widget,
|
||||
CollapsingHeader, FontFamily, FontId, RichText, SelectableLabel, TextFormat, Widget,
|
||||
output::OpenUrl, text::LayoutJob,
|
||||
};
|
||||
use globset::Glob;
|
||||
use objdiff_core::{
|
||||
config::{path::check_path_buf, DEFAULT_WATCH_PATTERNS},
|
||||
config::{DEFAULT_WATCH_PATTERNS, path::check_path_buf},
|
||||
diff::{
|
||||
ConfigEnum, ConfigEnumVariantInfo, ConfigPropertyId, ConfigPropertyKind,
|
||||
ConfigPropertyValue, CONFIG_GROUPS,
|
||||
CONFIG_GROUPS, ConfigEnum, ConfigEnumVariantInfo, ConfigPropertyId, ConfigPropertyKind,
|
||||
ConfigPropertyValue,
|
||||
},
|
||||
jobs::{check_update::CheckUpdateResult, Job, JobQueue, JobResult},
|
||||
jobs::{Job, JobQueue, JobResult, check_update::CheckUpdateResult},
|
||||
};
|
||||
use typed_path::Utf8PlatformPathBuf;
|
||||
|
||||
@@ -347,11 +347,7 @@ fn display_unit(
|
||||
let color = if selected {
|
||||
appearance.emphasized_text_color
|
||||
} else if let Some(complete) = object.complete {
|
||||
if complete {
|
||||
appearance.insert_color
|
||||
} else {
|
||||
appearance.delete_color
|
||||
}
|
||||
if complete { appearance.insert_color } else { appearance.delete_color }
|
||||
} else {
|
||||
appearance.text_color
|
||||
};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::{cmp::min, default::Default, mem::take};
|
||||
|
||||
use egui::{text::LayoutJob, Label, Sense, Widget};
|
||||
use egui::{Label, Sense, Widget, text::LayoutJob};
|
||||
use objdiff_core::{
|
||||
diff::{
|
||||
data::resolve_relocation,
|
||||
display::{relocation_context, relocation_hover, ContextItem, HoverItem},
|
||||
DataDiff, DataDiffKind, DataRelocationDiff,
|
||||
data::resolve_relocation,
|
||||
display::{ContextItem, HoverItem, relocation_context, relocation_hover},
|
||||
},
|
||||
obj::Object,
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use egui::{text::LayoutJob, Id, Layout, RichText, ScrollArea, TextEdit, Ui, Widget};
|
||||
use egui::{Id, Layout, RichText, ScrollArea, TextEdit, Ui, Widget, text::LayoutJob};
|
||||
use objdiff_core::{
|
||||
build::BuildStatus,
|
||||
diff::{
|
||||
display::{ContextItem, HoverItem, HoverItemColor, SymbolFilter, SymbolNavigationKind},
|
||||
DiffObjConfig, ObjectDiff, SectionDiff, SymbolDiff,
|
||||
display::{ContextItem, HoverItem, HoverItemColor, SymbolFilter, SymbolNavigationKind},
|
||||
},
|
||||
obj::{Object, Section, Symbol},
|
||||
};
|
||||
@@ -14,13 +14,12 @@ use crate::{
|
||||
views::{
|
||||
appearance::Appearance,
|
||||
column_layout::{render_header, render_strips, render_table},
|
||||
data_diff::{data_row_ui, split_diffs, BYTES_PER_ROW},
|
||||
data_diff::{BYTES_PER_ROW, data_row_ui, split_diffs},
|
||||
extab_diff::extab_ui,
|
||||
function_diff::{asm_col_ui, FunctionDiffContext},
|
||||
function_diff::{FunctionDiffContext, asm_col_ui},
|
||||
symbol_diff::{
|
||||
match_color_for_symbol, symbol_context_menu_ui, symbol_hover_ui, symbol_list_ui,
|
||||
DiffViewAction, DiffViewNavigation, DiffViewState, SymbolDiffContext, SymbolRefByName,
|
||||
View,
|
||||
View, match_color_for_symbol, symbol_context_menu_ui, symbol_hover_ui, symbol_list_ui,
|
||||
},
|
||||
write_text,
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use std::{cmp::Ordering, default::Default};
|
||||
|
||||
use egui::{text::LayoutJob, Label, Response, Sense, Widget};
|
||||
use egui::{Label, Response, Sense, Widget, text::LayoutJob};
|
||||
use egui_extras::TableRow;
|
||||
use objdiff_core::{
|
||||
diff::{
|
||||
display::{
|
||||
display_row, instruction_context, instruction_hover, DiffText, DiffTextColor,
|
||||
DiffTextSegment, HighlightKind,
|
||||
},
|
||||
DiffObjConfig, InstructionDiffKind, InstructionDiffRow, ObjectDiff,
|
||||
display::{
|
||||
DiffText, DiffTextColor, DiffTextSegment, HighlightKind, display_row,
|
||||
instruction_context, instruction_hover,
|
||||
},
|
||||
},
|
||||
obj::{InstructionArgValue, InstructionRef, Object},
|
||||
util::ReallySigned,
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::{
|
||||
};
|
||||
|
||||
use anyhow::Result;
|
||||
use egui::{text::LayoutJob, Context, FontId, RichText, TextFormat, TextStyle, Window};
|
||||
use egui::{Context, FontId, RichText, TextFormat, TextStyle, Window, text::LayoutJob};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::views::{appearance::Appearance, frame_history::FrameHistory};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use egui::{text::LayoutJob, Color32, FontId, TextFormat};
|
||||
use egui::{Color32, FontId, TextFormat, text::LayoutJob};
|
||||
|
||||
pub(crate) mod appearance;
|
||||
pub(crate) mod column_layout;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
use std::mem::take;
|
||||
|
||||
use egui::{
|
||||
style::ScrollAnimation, text::LayoutJob, CollapsingHeader, Color32, Id, OpenUrl, ScrollArea,
|
||||
SelectableLabel, Ui, Widget,
|
||||
CollapsingHeader, Color32, Id, OpenUrl, ScrollArea, SelectableLabel, Ui, Widget,
|
||||
style::ScrollAnimation, text::LayoutJob,
|
||||
};
|
||||
use objdiff_core::{
|
||||
diff::{
|
||||
display::{
|
||||
display_sections, symbol_context, symbol_hover, HighlightKind, SectionDisplay,
|
||||
SymbolFilter, SymbolNavigationKind,
|
||||
},
|
||||
ObjectDiff, SymbolDiff,
|
||||
display::{
|
||||
HighlightKind, SectionDisplay, SymbolFilter, SymbolNavigationKind, display_sections,
|
||||
symbol_context, symbol_hover,
|
||||
},
|
||||
},
|
||||
jobs::{create_scratch::CreateScratchResult, objdiff::ObjDiffResult, Job, JobQueue, JobResult},
|
||||
jobs::{Job, JobQueue, JobResult, create_scratch::CreateScratchResult, objdiff::ObjDiffResult},
|
||||
obj::{Object, Section, SectionKind, Symbol, SymbolFlag},
|
||||
};
|
||||
use regex::{Regex, RegexBuilder};
|
||||
|
||||
Reference in New Issue
Block a user