Skip to content

Commit

Permalink
Doc test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lijunwangs committed Nov 17, 2023
1 parent 4e1c29a commit 6778005
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions geyser-plugin-interface/src/geyser_plugin_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,22 @@ pub trait GeyserPlugin: Any + Send + Sync + std::fmt::Debug {
/// # Examples
///
/// ```
/// fn setup_logger(&self, logger: &'static dyn log::Log, level: log::LevelFilter) -> Result<()> {
/// log::set_max_level(level);
/// if let Err(err) = log::set_logger(logger) {
/// return Err(GeyserPluginError::Custom(Box::new(err)));
/// }
/// Ok(())
/// use solana_geyser_plugin_interface::geyser_plugin_interface::{GeyserPlugin,
/// GeyserPluginError, Result};
///
/// #[derive(Debug)]
/// struct SamplePlugin;
/// impl GeyserPlugin for SamplePlugin {
/// fn setup_logger(&self, logger: &'static dyn log::Log, level: log::LevelFilter) -> Result<()> {
/// log::set_max_level(level);
/// if let Err(err) = log::set_logger(logger) {
/// return Err(GeyserPluginError::Custom(Box::new(err)));
/// }
/// Ok(())
/// }
/// fn name(&self) -> &'static str {
/// &"sample"
/// }
/// }
/// ```
#[allow(unused_variables)]
Expand Down

0 comments on commit 6778005

Please sign in to comment.