Skip to content

Commit

Permalink
fix for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
gvaradarajan committed Nov 30, 2023
1 parent 00ea041 commit ae5b6ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions micro-rdk-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ pub fn impl_readings_for_movement_sensor(input: TokenStream) -> TokenStream {
let crate_ident = get_micro_rdk_crate_ident();
let gen = quote! {
impl #impl_generics #crate_ident::common::sensor::Readings for #name #ty_generics #where_clause {
fn get_generic_readings(&mut self) -> anyhow::Result<crate::common::sensor::GenericReadingsResult> {
fn get_generic_readings(&mut self) -> anyhow::Result<#crate_ident::common::sensor::GenericReadingsResult> {
#crate_ident::common::movement_sensor::get_movement_sensor_generic_readings(self)
}
}
};

gen.into()
}

Expand All @@ -53,7 +52,7 @@ pub fn impl_readings_for_power_sensor(input: TokenStream) -> TokenStream {
let crate_ident = get_micro_rdk_crate_ident();
let gen = quote! {
impl #impl_generics #crate_ident::common::sensor::Readings for #name #ty_generics #where_clause {
fn get_generic_readings(&mut self) -> anyhow::Result<crate::common::sensor::GenericReadingsResult> {
fn get_generic_readings(&mut self) -> anyhow::Result<#crate_ident::common::sensor::GenericReadingsResult> {
#crate_ident::common::power_sensor::get_power_sensor_generic_readings(self)
}
}
Expand Down

0 comments on commit ae5b6ec

Please sign in to comment.