Skip to content

Commit f8ee4b6

Browse files
committed
util/errors/json: Remove obsolete ReadOnlyMode struct
This is not used anywhere anymore.
1 parent a140175 commit f8ee4b6

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/util/errors/json.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,6 @@ fn json_error(detail: &str, status: StatusCode) -> Response {
1717
(status, json).into_response()
1818
}
1919

20-
// The following structs are empty and do not provide a custom message to the user
21-
22-
#[derive(Debug)]
23-
pub(crate) struct ReadOnlyMode;
24-
25-
impl AppError for ReadOnlyMode {
26-
fn response(&self) -> Response {
27-
let detail = "crates.io is currently in read-only mode for maintenance. \
28-
Please try again later.";
29-
json_error(detail, StatusCode::SERVICE_UNAVAILABLE)
30-
}
31-
}
32-
33-
impl fmt::Display for ReadOnlyMode {
34-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
35-
"Tried to write in read only mode".fmt(f)
36-
}
37-
}
38-
3920
// The following structs wrap owned data and provide a custom message to the user
4021

4122
pub fn custom(status: StatusCode, detail: impl Into<Cow<'static, str>>) -> BoxedAppError {

0 commit comments

Comments
 (0)