Skip to content

Commit f587bb5

Browse files
committed
fix(plugins): allow dead_code for unused hook fields
The hook registry stores hooks but the hook fields are not yet read as the plugin system is work in progress. Adding allow(dead_code) to silence clippy warnings while keeping the API intact.
1 parent 992b3d8 commit f587bb5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/cortex-plugins/src/hooks/registry.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,83 +99,95 @@ pub(crate) struct RegisteredModalInjectHook {
9999
}
100100

101101
/// Registered hook for toast notifications.
102+
#[allow(dead_code)]
102103
pub(crate) struct RegisteredToastShowHook {
103104
pub plugin_id: String,
104105
pub hook: Arc<dyn ToastShowHook>,
105106
pub priority: HookPriority,
106107
}
107108

108109
/// Registered hook for TUI event subscription.
110+
#[allow(dead_code)]
109111
pub(crate) struct RegisteredTuiEventSubscribeHook {
110112
pub plugin_id: String,
111113
pub hook: Arc<dyn TuiEventSubscribeHook>,
112114
pub priority: HookPriority,
113115
}
114116

115117
/// Registered hook for TUI event dispatch.
118+
#[allow(dead_code)]
116119
pub(crate) struct RegisteredTuiEventDispatchHook {
117120
pub plugin_id: String,
118121
pub hook: Arc<dyn TuiEventDispatchHook>,
119122
pub priority: HookPriority,
120123
}
121124

122125
/// Registered hook for custom event emission.
126+
#[allow(dead_code)]
123127
pub(crate) struct RegisteredCustomEventEmitHook {
124128
pub plugin_id: String,
125129
pub hook: Arc<dyn CustomEventEmitHook>,
126130
pub priority: HookPriority,
127131
}
128132

129133
/// Registered hook for event interception.
134+
#[allow(dead_code)]
130135
pub(crate) struct RegisteredEventInterceptHook {
131136
pub plugin_id: String,
132137
pub hook: Arc<dyn EventInterceptHook>,
133138
pub priority: HookPriority,
134139
}
135140

136141
/// Registered hook for animation frames.
142+
#[allow(dead_code)]
137143
pub(crate) struct RegisteredAnimationFrameHook {
138144
pub plugin_id: String,
139145
pub hook: Arc<dyn AnimationFrameHook>,
140146
pub priority: HookPriority,
141147
}
142148

143149
/// Registered hook for command.execute.before.
150+
#[allow(dead_code)]
144151
pub(crate) struct RegisteredCommandBeforeHook {
145152
pub plugin_id: String,
146153
pub hook: Arc<dyn CommandExecuteBeforeHook>,
147154
pub priority: HookPriority,
148155
}
149156

150157
/// Registered hook for command.execute.after.
158+
#[allow(dead_code)]
151159
pub(crate) struct RegisteredCommandAfterHook {
152160
pub plugin_id: String,
153161
pub hook: Arc<dyn CommandExecuteAfterHook>,
154162
pub priority: HookPriority,
155163
}
156164

157165
/// Registered hook for input interception.
166+
#[allow(dead_code)]
158167
pub(crate) struct RegisteredInputInterceptHook {
159168
pub plugin_id: String,
160169
pub hook: Arc<dyn InputInterceptHook>,
161170
pub priority: HookPriority,
162171
}
163172

164173
/// Registered hook for session start.
174+
#[allow(dead_code)]
165175
pub(crate) struct RegisteredSessionStartHook {
166176
pub plugin_id: String,
167177
pub hook: Arc<dyn SessionStartHook>,
168178
pub priority: HookPriority,
169179
}
170180

171181
/// Registered hook for session end.
182+
#[allow(dead_code)]
172183
pub(crate) struct RegisteredSessionEndHook {
173184
pub plugin_id: String,
174185
pub hook: Arc<dyn SessionEndHook>,
175186
pub priority: HookPriority,
176187
}
177188

178189
/// Registered hook for focus change.
190+
#[allow(dead_code)]
179191
pub(crate) struct RegisteredFocusChangeHook {
180192
pub plugin_id: String,
181193
pub hook: Arc<dyn FocusChangeHook>,

0 commit comments

Comments
 (0)