Skip to content

Commit

Permalink
Merge pull request #203 from Carter12s/maybe-unused
Browse files Browse the repository at this point in the history
Maybe unused
  • Loading branch information
Carter12s authored Oct 21, 2024
2 parents 1400f5b + 6767380 commit 9f278be
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Generated code now includes various lint attributes to suppress warnings.

### Changed

## 0.11.1
Expand Down
2 changes: 2 additions & 0 deletions roslibrust_codegen/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub fn generate_service(service: ServiceFile) -> Result<TokenStream, Error> {
#request_msg
#response_msg

#[allow(dead_code)]
pub struct #struct_name {

}
Expand Down Expand Up @@ -108,6 +109,7 @@ pub fn generate_struct(msg: MessageFile) -> Result<TokenStream, Error> {
// Only if we have constants append the impl
if !constants.is_empty() {
base.extend(quote! {
#[allow(unused)]
impl #struct_name {
#(#constants )*
}
Expand Down
7 changes: 7 additions & 0 deletions roslibrust_test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# roslibrust_test

Purpose of this crate is to provide some external tests for the roslibrust ecosystem.

Due to how codegen, the codegen macro, and main crate interact it is easier to stash some tests here.

Try to reserve this crate for larger scope integration tests, and prefer embedded unit tests in the other crates when possible.
Loading

0 comments on commit 9f278be

Please sign in to comment.