Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Jan 5, 2024
1 parent 62e8504 commit 8ba781f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/discord/post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ use crate::discord::model::Webhook;
///
/// # Example
/// ```rust
/// pub async fn foo(){
///
/// use pulse::discord::{model::Webhook, post::post};
///
/// pub async fn post_to_discord(){
/// let w = Webhook::new("https://discord.com/api/webhooks/xxx/yyy".to_string());
/// post(w, "this is some plaintext".to_string());
/// }
Expand Down
3 changes: 1 addition & 2 deletions src/web/response/github_verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ pub fn read_bytes(v: String) -> Vec<u8>
///
/// use pulse::web::response::github_verify::github_verify;
///
/// #[tokio::main]
/// pub async fn main() {
/// pub async fn server() {
/// let authenticated_state = "this_is_a_secret".to_string();
///
/// let app = Router::new()
Expand Down
7 changes: 3 additions & 4 deletions src/web/response/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ use chrono::Local;
///
/// use pulse::web::response::util::reflect;
///
/// #[tokio::main]
/// pub async fn main() {
/// pub async fn server() {
/// let app = Router::new()
/// .route("/", post(|| async move { }))
/// .layer(middleware::from_fn(reflect));
Expand Down Expand Up @@ -88,8 +87,8 @@ where B: axum::body::HttpBody<Data = Bytes>
///
/// use pulse::web::response::util::stdout_log;
///
/// #[tokio::main]
/// pub async fn main() {
///
/// pub async fn server() {
/// let app = Router::new()
/// .route("/", post(|| async move { }))
/// .layer(middleware::from_fn(stdout_log));
Expand Down

0 comments on commit 8ba781f

Please sign in to comment.