Skip to content

Commit 37b10e4

Browse files
author
Manuel Huber
committed
protocols: Fix rust linter error with rust v1.84
- post-process to remove box_pointers annotation for generated files - while this unblocks the build, should look for better solution: - request/teach codegen to not add certain linter annotation - update ttrpc-codegen or other dependencies Signed-off-by: Manuel Huber <mahuber@microsoft.com>
1 parent 5163038 commit 37b10e4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/libs/protocols/build.rs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,34 @@ fn real_main() -> Result<(), std::io::Error> {
215215
"self: ::std::boxed::Box<Self>",
216216
)?;
217217

218+
let mut box_pointers_files = vec![
219+
"src/types.rs",
220+
"src/agent.rs",
221+
"src/agent_ttrpc.rs",
222+
"src/csi.rs",
223+
"src/empty.rs",
224+
"src/gogo.rs",
225+
"src/health.rs",
226+
"src/health_ttrpc.rs",
227+
"src/oci.rs",
228+
];
229+
230+
#[cfg(feature = "async")]
231+
{
232+
box_pointers_files.extend(vec![
233+
"src/agent_ttrpc_async.rs",
234+
"src/health_ttrpc_async.rs"
235+
]);
236+
}
237+
238+
for f in box_pointers_files {
239+
replace_text_in_file(
240+
f,
241+
"#![allow(box_pointers)]",
242+
"",
243+
)?;
244+
}
245+
218246
Ok(())
219247
}
220248

0 commit comments

Comments
 (0)