diff --git a/dropshot/src/error.rs b/dropshot/src/error.rs index 81c8fe30..5cca098f 100644 --- a/dropshot/src/error.rs +++ b/dropshot/src/error.rs @@ -68,14 +68,14 @@ //! errors into `HttpError`s, or implement the [`HttpResponseError`] trait to //! provide their own mechanism. +use crate::ClientErrorStatusCode; +use crate::ErrorStatusCode; use hyper::Error as HyperError; use schemars::JsonSchema; use serde::Deserialize; use serde::Serialize; use std::error::Error; use std::fmt; -use crate::ErrorStatusCode; -use crate::ClientErrorStatusCode; /// `HttpError` represents an error generated as part of handling an API /// request. When these bubble up to the top of the request handling stack diff --git a/dropshot/src/error_status_code.rs b/dropshot/src/error_status_code.rs index 7f5491d6..2d4784f0 100644 --- a/dropshot/src/error_status_code.rs +++ b/dropshot/src/error_status_code.rs @@ -209,7 +209,6 @@ macro_rules! impl_status_code_wrapper { } impl ErrorStatusCode { - // These constants are copied from the `http` crate's `StatusCode` type. // Should new status codes be standardized and added upstream, we should add // them to this list. @@ -436,7 +435,6 @@ impl_status_code_wrapper! { pub struct ClientErrorStatusCode(http::StatusCode); impl ClientErrorStatusCode { - // These constants are copied from the `http` crate's `StatusCode` type. // Should new status codes be standardized and added upstream, we should add // them to this list. diff --git a/dropshot/src/handler.rs b/dropshot/src/handler.rs index ba3db930..5ede56a7 100644 --- a/dropshot/src/handler.rs +++ b/dropshot/src/handler.rs @@ -31,8 +31,8 @@ //! facilities don't seem that valuable right now since they largely don't affect //! OpenAPI document generation. -use super::error_status_code::ErrorStatusCode; use super::error::HttpError; +use super::error_status_code::ErrorStatusCode; use super::extractor::RequestExtractor; use super::http_util::CONTENT_TYPE_JSON; use super::http_util::CONTENT_TYPE_OCTET_STREAM; diff --git a/dropshot/src/router.rs b/dropshot/src/router.rs index 9831694a..97946d67 100644 --- a/dropshot/src/router.rs +++ b/dropshot/src/router.rs @@ -1,8 +1,8 @@ // Copyright 2024 Oxide Computer Company //! Routes incoming HTTP requests to handler functions -use super::error_status_code::ClientErrorStatusCode; use super::error::HttpError; +use super::error_status_code::ClientErrorStatusCode; use super::handler::RouteHandler; use crate::api_description::ApiEndpointVersions;