Skip to content

Commit b9a216c

Browse files
committed
clippy::doc-markdown
1 parent 955a403 commit b9a216c

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/cookies/middleware.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::sync::{Arc, RwLock};
2525
pub(crate) struct CookiesMiddleware;
2626

2727
impl CookiesMiddleware {
28-
/// Creates a new CookiesMiddleware.
28+
/// Creates a new `CookiesMiddleware`.
2929
pub fn new() -> Self {
3030
Self::default()
3131
}

src/security/cors.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl CorsMiddleware {
4747
}
4848
}
4949

50-
/// Set allow_credentials and return new Cors
50+
/// Set `allow_credentials` and return new Cors
5151
#[must_use]
5252
pub fn allow_credentials(mut self, allow_credentials: bool) -> Self {
5353
self.allow_credentials = match allow_credentials.to_string().parse() {
@@ -57,31 +57,31 @@ impl CorsMiddleware {
5757
self
5858
}
5959

60-
/// Set allow_headers and return new Cors
60+
/// Set `allow_headers` and return new Cors
6161
pub fn allow_headers<T: Into<HeaderValue>>(mut self, headers: T) -> Self {
6262
self.allow_headers = headers.into();
6363
self
6464
}
6565

66-
/// Set max_age and return new Cors
66+
/// Set `max_age` and return new Cors
6767
pub fn max_age<T: Into<HeaderValue>>(mut self, max_age: T) -> Self {
6868
self.max_age = max_age.into();
6969
self
7070
}
7171

72-
/// Set allow_methods and return new Cors
72+
/// Set `allow_methods` and return new Cors
7373
pub fn allow_methods<T: Into<HeaderValue>>(mut self, methods: T) -> Self {
7474
self.allow_methods = methods.into();
7575
self
7676
}
7777

78-
/// Set allow_origin and return new Cors
78+
/// Set `allow_origin` and return new Cors
7979
pub fn allow_origin<T: Into<Origin>>(mut self, origin: T) -> Self {
8080
self.allow_origin = origin.into();
8181
self
8282
}
8383

84-
/// Set expose_headers and return new Cors
84+
/// Set `expose_headers` and return new Cors
8585
pub fn expose_headers<T: Into<HeaderValue>>(mut self, headers: T) -> Self {
8686
self.expose_headers = Some(headers.into());
8787
self
@@ -123,7 +123,7 @@ impl CorsMiddleware {
123123
response
124124
}
125125

126-
/// Look at origin of request and determine allow_origin
126+
/// Look at origin of request and determine `allow_origin`
127127
fn response_origin(&self, origin: &HeaderValue) -> Option<HeaderValue> {
128128
if !self.is_valid_origin(origin) {
129129
return None;
@@ -199,7 +199,7 @@ impl Default for CorsMiddleware {
199199
}
200200
}
201201

202-
/// allow_origin enum
202+
/// `allow_origin` enum
203203
#[derive(Clone, Debug, Hash, PartialEq)]
204204
pub enum Origin {
205205
/// Wildcard. Accept all origin requests

0 commit comments

Comments
 (0)