Skip to content

Commit

Permalink
fix: Update features cfg for octocrab
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekMasher committed Aug 7, 2024
1 parent 3fe0cf3 commit e1aa499
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default = ["octocrab"]

octocrab = ["dep:octocrab"]
# Web frameworks
rocket = ["dep:rocket"]
rocket = ["dep:rocket", "octocrab"]

[dependencies]
thiserror = "1"
Expand Down
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub enum OctoAppError {
IoError(#[from] std::io::Error),

/// Octocrab Error
#[cfg(feature = "octocrab")]
#[error("Octocrab Error: {0}")]
OctocrabError(#[from] octocrab::Error),

Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![doc = include_str!("../README.md")]

#[cfg(feature = "octocrab")]
extern crate octocrab;

pub mod config;
pub mod error;
#[cfg(feature = "octocrab")]
pub mod events;

#[cfg(feature = "rocket")]
pub mod ghrocket;

pub use config::OctoAppConfig;
pub use error::OctoAppError;
#[cfg(feature = "octocrab")]
pub use events::WebHook;

#[cfg(feature = "rocket")]
Expand All @@ -22,9 +26,11 @@ pub use ghrocket::OctoAppState;
pub mod prelude {
pub use crate::config::OctoAppConfig;
pub use crate::error::OctoAppError;
#[cfg(feature = "octocrab")]
pub use crate::events::{Event, WebHook};

// Re-export payloads
#[cfg(feature = "octocrab")]
pub use crate::events::payloads::*;

#[cfg(feature = "rocket")]
Expand Down

0 comments on commit e1aa499

Please sign in to comment.