Skip to content

Commit

Permalink
Fix doctests???
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Sep 8, 2024
1 parent aeae5bc commit dfae60d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions auxtools-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ pub fn pin_dll(attr: TokenStream) -> TokenStream {
///
/// Here we define a hook that multiplies a number passed to it by two.
/// It can now be used to hook procs, for example
/// `hooks::hook("/proc/double_up", double_up);` ```ignore
/// `hooks::hook("/proc/double_up", double_up);`
///
/// ```ignore
/// #[hook]
/// fn double_up(num: Value) {
/// if let Some(num) = num.as_number() {
Expand All @@ -189,9 +191,10 @@ pub fn pin_dll(attr: TokenStream) -> TokenStream {
/// Value::null()
/// }
/// ```
///
///
/// This function is used to hook `/mob/proc/on_honked`.
/// By specifying the proc path, we hook the proc immediately upon startup.
///
/// ```ignore
/// #[hook("/mob/proc/on_honked")]
/// fn on_honked(honker: Value) {
Expand All @@ -200,7 +203,6 @@ pub fn pin_dll(attr: TokenStream) -> TokenStream {
/// Value::null()
/// }
/// ```
#[proc_macro_attribute]
pub fn hook(attr: TokenStream, item: TokenStream) -> TokenStream {
let input = syn::parse_macro_input!(item as syn::ItemFn);
Expand Down

0 comments on commit dfae60d

Please sign in to comment.