Fixing warnings

This commit is contained in:
Emil Fresk 2021-02-20 18:32:05 +01:00
parent ebf2f058a4
commit d02f9a0241

View file

@ -107,7 +107,7 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
let app_name = &app.name; let app_name = &app.name;
let app_path = quote! {crate::#app_name}; let app_path = quote! {crate::#app_name};
let monotonic_imports: Vec<_> = app let monotonic_parts: Vec<_> = app
.monotonics .monotonics
.iter() .iter()
.map(|(_, monotonic)| { .map(|(_, monotonic)| {
@ -116,9 +116,12 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
let mangled_name = util::mangle_monotonic_type(&name.to_string()); let mangled_name = util::mangle_monotonic_type(&name.to_string());
let ident = util::monotonic_ident(&name.to_string()); let ident = util::monotonic_ident(&name.to_string());
quote! { quote! {
pub use rtic::Monotonic as _;
#[doc(hidden)] #[doc(hidden)]
pub type #mangled_name = #ty; pub type #mangled_name = #ty;
#[allow(non_snake_case)]
pub mod #name { pub mod #name {
pub fn now() -> rtic::time::Instant<#app_path::#mangled_name> { pub fn now() -> rtic::time::Instant<#app_path::#mangled_name> {
rtic::export::interrupt::free(|_| { rtic::export::interrupt::free(|_| {
@ -144,7 +147,7 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
/// Always include the device crate which contains the vector table /// Always include the device crate which contains the vector table
use #device as #rt_err; use #device as #rt_err;
#(#monotonic_imports)* #(#monotonic_parts)*
#(#user_imports)* #(#user_imports)*