Skip to content

Commit

Permalink
Fix rustdoc lints
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Feb 5, 2024
1 parent 5910ae8 commit 958a3bd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/internal/handle.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functions for handling raw sockets.
//!
//! These methods may be useful for creating your own [`crate::server::EventLoop`].
//! These methods may be useful for creating your own [`crate::internal::event_loop::EventLoop`].
use std::{cell::RefCell, io::Read, net::Shutdown, sync::Arc};

Expand Down
4 changes: 2 additions & 2 deletions lib/internal/thread_pool.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! A resizable thread pool implementation.
//! Used for handling multiple connections at once.
//!
//! You can access the thread pool from within a route handler with [`Context::thread_pool`].
//! You can access the thread pool from within a route handler with `ctx.server.thread_pool`.
//! With this, you can resize the thread pool, get the current thread id, or execute a job on the thread pool.
//! To get the current thread id, use [`ThreadPool::current_thread`].
//! To execute a job on the thread pool, use [`ThreadPool::execute`].
Expand Down Expand Up @@ -258,7 +258,7 @@ impl Worker {
}

impl Drop for ThreadPool {
/// Stops all workers with a [`Message::Kill`] message, and waits for them to finish.
/// Stops all workers with a kill message, and waits for them to finish.
fn drop(&mut self) {
trace!(
Level::Debug,
Expand Down
6 changes: 3 additions & 3 deletions lib/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Handler<State> = Box<dyn Fn(&Context<State>) -> AnyResult<()> + 'static + S
/// Defines a route.
///
/// You should not use this directly.
/// It will be created automatically when using [`crate::Server::route`] or [`crate::Server::stateful_route`].
/// It will be created automatically when using [`crate::Server::route`].
pub struct Route<State: 'static + Send + Sync> {
/// Route Method (GET, POST, ANY, etc.)
method: Method,
Expand All @@ -38,9 +38,9 @@ impl<State: Send + Sync> Debug for Route<State> {
}
}

/// An error handler is part of a [`Server`] and it is called when a [`Route`] returns an error.
/// An error handler is part of a [`crate::Server`] and it is called when a [`Route`] returns an error.
///
/// This trait has just one method, [`handle`], which takes a reference to the server and the error, and produces a response.
/// This trait has just one method, [`ErrorHandler::handle`], which takes a reference to the server and the error, and produces a response.
/// The default error handler is [`DefaultErrorHandler`], which produces a basic text response.
///
/// Custom error handlers can be created to produce more complex responses.
Expand Down
4 changes: 2 additions & 2 deletions lib/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ impl<State: Send + Sync> Server<State> {
}

/// Set the state of a server.
/// The state will be available to stateful routes ([`Server::stateful_route`]) and middleware.
/// It is not mutable, so you will need to use an atomic or sync type to mutate it.
/// The state will be available to routes and middleware.
/// It is not mutable, so you will need to use an atomic or other sync interior mutability type to modify it.
///
/// ## Example
/// ```rust,no_run
Expand Down

0 comments on commit 958a3bd

Please sign in to comment.