mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
api_client: Address Rust 1.51.0 clippy issue (upper_case_acroynms)
--> api_client/src/lib.rs:40:5 | 40 | OK, | ^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Ok` | = note: `-D clippy::upper-case-acronyms` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
7390475636
commit
030d6046b2
@ -37,7 +37,7 @@ impl fmt::Display for Error {
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum StatusCode {
|
||||
Continue,
|
||||
OK,
|
||||
Ok,
|
||||
NoContent,
|
||||
BadRequest,
|
||||
NotFound,
|
||||
@ -50,7 +50,7 @@ impl StatusCode {
|
||||
fn from_raw(code: usize) -> StatusCode {
|
||||
match code {
|
||||
100 => StatusCode::Continue,
|
||||
200 => StatusCode::OK,
|
||||
200 => StatusCode::Ok,
|
||||
204 => StatusCode::NoContent,
|
||||
400 => StatusCode::BadRequest,
|
||||
404 => StatusCode::NotFound,
|
||||
@ -69,7 +69,7 @@ impl StatusCode {
|
||||
fn is_server_error(self) -> bool {
|
||||
!matches!(
|
||||
self,
|
||||
StatusCode::OK | StatusCode::Continue | StatusCode::NoContent
|
||||
StatusCode::Ok | StatusCode::Continue | StatusCode::NoContent
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user