Browse Source

Fix some dead code warnings

tags/v0.3.3-rc1
Philipp Oppermann 1 year ago
parent
commit
dc8a794835
Failed to extract signature
2 changed files with 1 additions and 4 deletions
  1. +1
    -2
      libraries/extensions/ros2-bridge/msg-gen/src/lib.rs
  2. +0
    -2
      libraries/extensions/ros2-bridge/msg-gen/src/types/primitives.rs

+ 1
- 2
libraries/extensions/ros2-bridge/msg-gen/src/lib.rs View File

@@ -9,9 +9,7 @@

use std::path::Path;

use proc_macro2::Span;
use quote::quote;
use syn::Ident;

pub mod parser;
pub mod types;
@@ -46,6 +44,7 @@ where
(
quote! { #[cxx::bridge] },
quote! {
#[allow(dead_code)]
extern "C++" {
type CombinedEvents = crate::ffi::CombinedEvents;
type CombinedEvent = crate::ffi::CombinedEvent;


+ 0
- 2
libraries/extensions/ros2-bridge/msg-gen/src/types/primitives.rs View File

@@ -131,7 +131,6 @@ pub struct NamedType(pub String);
impl NamedType {
fn type_tokens(&self, package: &str) -> impl ToTokens {
let package = Ident::new(package, Span::call_site());
let namespace = Ident::new("msg", Span::call_site());
let name = Ident::new(&self.0, Span::call_site());
let ident = format_ident!("{package}__{name}");
quote! { #ident }
@@ -174,7 +173,6 @@ pub struct NamespacedType {
impl NamespacedType {
fn type_tokens(&self) -> impl ToTokens {
let package = Ident::new(&self.package, Span::call_site());
let namespace = Ident::new(&self.namespace, Span::call_site());
let name = Ident::new(&self.name, Span::call_site());
let ident = format_ident!("{package}__{name}");
quote! { #ident }


Loading…
Cancel
Save