Skip to content

Commit

Permalink
Update doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
divergentdave committed May 12, 2023
1 parent d4377cd commit 48d08c7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/handler/origin_router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ impl OriginRouter {
.map(|boxed_handler| &**boxed_handler)
}

/// Construct a new OriginRouter
/// Construct a new OriginRouter.
pub fn new() -> Self {
Self::default()
}

/// add a handler to this origin router at the specified exact origin, returning self
/// see also [`add_handler`]
/// Add a handler to this origin router at the specified exact origin, returning self.
/// See also [`add_handler`].
pub fn with_handler(mut self, origin: &str, handler: impl Handler) -> Self {
self.add_handler(origin, handler);
self
}

/// add a handler to this origin router at the specified exect origin.
/// see also [`with_handler`] for chainability
/// Add a handler to this origin router at the specified exact origin.
/// See also [`with_handler`] for chainability.
pub fn add_handler(&mut self, origin: &str, handler: impl Handler) {
self.map.insert(
origin.to_lowercase().trim_end_matches('/').to_owned(),
Expand Down

0 comments on commit 48d08c7

Please sign in to comment.