Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
conectado committed May 24, 2023
1 parent a384218 commit 50d80a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use syn::{Data, DeriveInput, Fields};
/// Macro that generates a new enum with only the discriminants of another enum within a module that implements swift_bridge.
///
/// This is a workaround to create an error type compatible with swift that can be converted from the original error type.
/// it implements From<OriginalEnum> so the idea is that you can call a swift ffi function `handle_error(err.into());``
/// it implements `From<OriginalEnum>` so the idea is that you can call a swift ffi function `handle_error(err.into());`
///
/// This makes a lot of assumption about the types it's being implemented on since we're controling the type it is not meant
/// to be a public macro. (However be careful if you reuse it somewhere else! this is based in strum's EnumDiscrminant so you can
Expand Down Expand Up @@ -87,6 +87,7 @@ fn swift_enum_inner(ast: &DeriveInput) -> syn::Result<TokenStream> {
}
}
};

// If we wanted to expose this function we should have another crate that actually also includes
// swift_bridge. but since we are only using this inside our crates we can just make sure we include it.
Ok(quote! {
Expand Down

0 comments on commit 50d80a4

Please sign in to comment.