File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff 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
4122pub fn custom ( status : StatusCode , detail : impl Into < Cow < ' static , str > > ) -> BoxedAppError {
You can’t perform that action at this time.
0 commit comments