mirror of
https://github.com/YGGverse/titanite.git
synced 2026-03-31 17:15:33 +00:00
apply clippy
This commit is contained in:
parent
44419afc16
commit
20d58b6be1
17 changed files with 17 additions and 17 deletions
|
|
@ -19,7 +19,7 @@ impl Expected {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl NotAuthorized {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl NotValid {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl BadRequest {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl General {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl Gone {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl NotFound {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl ProxyRequestRefused {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl CgiError {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl General {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl ProxyError {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl ServerUnavailable {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl SlowDown {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl Default {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ impl Sensitive {
|
|||
bail!("Invalid status code")
|
||||
}
|
||||
Ok(Self {
|
||||
message: String::from_utf8((&h[3..]).to_vec()).map(|m| {
|
||||
message: String::from_utf8((h[3..]).to_vec()).map(|m| {
|
||||
if m.is_empty() {
|
||||
None
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ impl Permanent {
|
|||
target: if h.is_empty() {
|
||||
bail!("Target required")
|
||||
} else {
|
||||
String::from_utf8((&h[3..]).to_vec())?
|
||||
String::from_utf8((h[3..]).to_vec())?
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ impl Temporary {
|
|||
target: if h.is_empty() {
|
||||
bail!("Target required")
|
||||
} else {
|
||||
String::from_utf8((&h[3..]).to_vec())?
|
||||
String::from_utf8((h[3..]).to_vec())?
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue