fix: all doctest err in ewwii_plugin_api
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
/// The following example shows how you can use this macro to
|
/// The following example shows how you can use this macro to
|
||||||
/// easily make plugins in a single step.
|
/// easily make plugins in a single step.
|
||||||
///
|
///
|
||||||
/// ```rust,no_run
|
/// ```rust,ignore
|
||||||
/// use ewwii_plugin_api::auto_plugin;
|
/// use ewwii_plugin_api::auto_plugin;
|
||||||
///
|
///
|
||||||
/// auto_plugin!(MyPluginName, {
|
/// auto_plugin!(MyPluginName, {
|
||||||
@@ -28,13 +28,13 @@ macro_rules! auto_plugin {
|
|||||||
pub struct $struct_name;
|
pub struct $struct_name;
|
||||||
|
|
||||||
// Implement the Plugin trait
|
// Implement the Plugin trait
|
||||||
impl crate::Plugin for $struct_name {
|
impl $crate::Plugin for $struct_name {
|
||||||
fn init(&self, host: &dyn crate::EwwiiAPI) {
|
fn init(&self, host: &dyn $crate::EwwiiAPI) {
|
||||||
$init_block
|
$init_block
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
crate::export_plugin!($struct_name);
|
$crate::export_plugin!($struct_name);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ pub trait EwwiiAPI: Send + Sync {
|
|||||||
/// impl Plugin for MyStruct {
|
/// impl Plugin for MyStruct {
|
||||||
/// fn init(&self, host: &dyn EwwiiAPI) {
|
/// fn init(&self, host: &dyn EwwiiAPI) {
|
||||||
/// /* Implementation Skipped */
|
/// /* Implementation Skipped */
|
||||||
// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// // Automatically does all the FFI related exports
|
/// // Automatically does all the FFI related exports
|
||||||
|
|||||||
Reference in New Issue
Block a user