0aa2a9ac27
1093: Add random example r=Dirbaio a=miathedev Thanks Lulf for the help! This should be added as example so other people can look it up easily. With love, Mia 1127: clean up doc comment generation r=Dirbaio a=Weshnaw I noticed that when I created doc comments for my tasks that the doc comments got included on the inner function but not the outer functions, I personally prefer keeping the documentation as clean as possible so this PR aims to hide the inner function and then add doc comments to the outer function. The actual changes include: * adding #[doc(hidden)] onto the `task_inner` function * I flip flopped on this one because I could imagine someone may want this in their docs, but decided to include but I think arguments could be made either way * copy the attributes from `task_inner` to `task_outer` * I don't work with proc_macros often so I am not entirely sure if the way I went about it is correct but it seems to work fine * specifically: using `parse_quote` to create the `task_outer` as a `ItemFn` then duplicating the attributes from `task_inner` to `task_outer` * I also am not sure if it's a good idea to duplicate all attributes over, but I honestly wasn't sure how to just get the just doc comment attributes ![OLD doc](https://user-images.githubusercontent.com/3748858/209456006-bfa6d40d-d3bf-4c1d-a2de-cf40828b58e5.png) ![NEW doc](https://user-images.githubusercontent.com/3748858/209456011-995363a3-f5b1-4ea3-9db9-1c566643efcb.png) Co-authored-by: miathedev <mia@metzler.systems> Co-authored-by: Brendon Fallquist <bfallquist@gmail.com> |
||
---|---|---|
.. | ||
boot | ||
nrf | ||
nrf-rtos-trace | ||
rp | ||
std | ||
stm32f0 | ||
stm32f1 | ||
stm32f2 | ||
stm32f3 | ||
stm32f4 | ||
stm32f7 | ||
stm32g0 | ||
stm32g4 | ||
stm32h7 | ||
stm32l0 | ||
stm32l1 | ||
stm32l4 | ||
stm32l5 | ||
stm32u5 | ||
stm32wb | ||
stm32wl | ||
wasm |