File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -520,6 +520,7 @@ mod tests {
520520 use cot:: test:: TestRequestBuilder ;
521521
522522 use super :: * ;
523+ use crate :: Method ;
523524 use crate :: error:: MethodNotAllowed ;
524525 use crate :: request:: extractors:: Path ;
525526 use crate :: response:: { IntoResponse , Response } ;
Original file line number Diff line number Diff line change @@ -73,14 +73,15 @@ impl ErrorPageTemplateBuilder {
7373 if let Some ( not_found) = error. inner ( ) . downcast_ref :: < NotFound > ( ) {
7474 use cot_core:: error:: NotFoundKind as Kind ;
7575 match & not_found. kind {
76- Kind :: FromRouter => { }
77- Kind :: Custom => {
76+ Kind :: FromRouter { .. } => { }
77+ Kind :: Custom { .. } => {
7878 Self :: build_error_data ( & mut error_data, error) ;
7979 }
80- Kind :: WithMessage ( message) => {
80+ Kind :: WithMessage { 0 : message, .. } => {
8181 Self :: build_error_data ( & mut error_data, error) ;
8282 error_message = Some ( message. clone ( ) ) ;
8383 }
84+ _ => { }
8485 }
8586 }
8687
@@ -164,7 +165,7 @@ impl ErrorPageTemplateBuilder {
164165 }
165166 }
166167
167- fn build_error_data ( vec : & mut Vec < ErrorData > , error : & ( dyn std:: error:: Error + ' static ) ) {
168+ fn build_error_data ( vec : & mut Vec < ErrorData > , error : & ( dyn std:: error:: Error + ' static ) ) {
168169 let data = ErrorData {
169170 description : error. to_string ( ) ,
170171 debug_str : format ! ( "{error:#?}" ) ,
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ use crate::request::RequestExt;
1717#[ derive( Debug , thiserror:: Error ) ]
1818#[ error( "invalid content type; expected `{expected}`, found `{actual}`" ) ]
1919pub struct InvalidContentType {
20- expected : & ' static str ,
21- actual : String ,
20+ pub ( crate ) expected : & ' static str ,
21+ pub ( crate ) actual : String ,
2222}
2323impl_into_cot_error ! ( InvalidContentType , BAD_REQUEST ) ;
2424
You can’t perform that action at this time.
0 commit comments