File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ use tower::Service;
1212
1313#[ make( kind = StatusCode ) ]
1414pub struct MakeStatusCodeRouteService {
15- status_code : u16 ,
15+ status : u16 ,
1616}
1717
1818impl MakeRouteService for MakeStatusCodeRouteService {
1919 type Service = StatusCodeRouteService ;
2020
2121 fn make ( & self , args : Args ) -> Result < Self :: Service , Error > {
2222 Config :: with_args ( args)
23- . and_then ( |config| StatusCode :: from_u16 ( config. status_code ) . map_err ( Error :: new) )
23+ . and_then ( |config| StatusCode :: from_u16 ( config. status ) . map_err ( Error :: new) )
2424 . map ( StatusCodeRouteService )
2525 }
2626}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ async fn make_with_shortcut() {
4141
4242#[ tokio:: test]
4343async fn make_with_full ( ) {
44- let value = serde_yaml:: from_str :: < Value > ( r#"status-code : 404"# ) . unwrap ( ) ;
44+ let value = serde_yaml:: from_str :: < Value > ( r#"status: 404"# ) . unwrap ( ) ;
4545 let args = Args :: full ( & value) ;
4646 let service = MakeStatusCodeRouteService . make ( args) . unwrap ( ) ;
4747 let status_code = call ( service) . await ;
You can’t perform that action at this time.
0 commit comments