MCPcopy Index your code
hub / github.com/encounter/objdiff / create_objdiff_config

Function create_objdiff_config

objdiff-gui/src/jobs.rs:93–123  ·  view source on GitHub ↗
(state: &AppState)

Source from the content-addressed store, hash-verified

91}
92
93pub fn create_objdiff_config(state: &AppState) -> objdiff::ObjDiffConfig {
94 objdiff::ObjDiffConfig {
95 build_config: BuildConfig::from(&state.config),
96 build_base: state.config.build_base,
97 build_target: state.config.build_target,
98 target_path: state
99 .config
100 .selected_obj
101 .as_ref()
102 .and_then(|obj| obj.target_path.as_ref())
103 .cloned(),
104 base_path: state
105 .config
106 .selected_obj
107 .as_ref()
108 .and_then(|obj| obj.base_path.as_ref())
109 .cloned(),
110 diff_obj_config: state.effective_diff_config(),
111 mapping_config: MappingConfig {
112 mappings: state
113 .config
114 .selected_obj
115 .as_ref()
116 .map(|obj| &obj.symbol_mappings)
117 .cloned()
118 .unwrap_or_default(),
119 selecting_left: state.selecting_left.clone(),
120 selecting_right: state.selecting_right.clone(),
121 },
122 }
123}
124
125pub fn start_build(ctx: &egui::Context, jobs: &mut JobQueue, config: objdiff::ObjDiffConfig) {
126 jobs.push_once(Job::ObjDiff, || objdiff::start_build(egui_waker(ctx), config));

Callers 1

post_updateMethod · 0.70

Calls 1

effective_diff_configMethod · 0.80

Tested by

no test coverage detected