File tree Expand file tree Collapse file tree 7 files changed +10
-4
lines changed Expand file tree Collapse file tree 7 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ async fn main() -> tide::Result<()> {
2020 name : "chashu" . into ( ) ,
2121 } ;
2222
23- Ok ( Body :: from_json ( & cat) ? )
23+ Body :: from_json ( & cat)
2424 } ) ;
2525
2626 app. at ( "/animals" ) . get ( |_| async {
Original file line number Diff line number Diff line change @@ -57,5 +57,6 @@ pub trait ToListener<State: Clone + Send + Sync + 'static> {
5757 /// listener does not initiate a connection. An Err return
5858 /// indicates an unsuccessful conversion to a listener, not an
5959 /// unsuccessful bind attempt.
60+ #[ allow( clippy:: wrong_self_convention) ]
6061 fn to_listener ( self ) -> io:: Result < Self :: Listener > ;
6162}
Original file line number Diff line number Diff line change @@ -96,12 +96,14 @@ where
9696 }
9797}
9898
99+ #[ allow( clippy:: from_over_into) ]
99100impl < T : AsRef < str > > Into < Response > for Redirect < T > {
100101 fn into ( self ) -> Response {
101102 ( & self ) . into ( )
102103 }
103104}
104105
106+ #[ allow( clippy:: from_over_into) ]
105107impl < T : AsRef < str > > Into < Response > for & Redirect < T > {
106108 fn into ( self ) -> Response {
107109 let mut res = Response :: new ( self . status ) ;
Original file line number Diff line number Diff line change @@ -570,20 +570,21 @@ impl<State> Read for Request<State> {
570570 }
571571}
572572
573+ #[ allow( clippy:: from_over_into) ]
573574impl < State > Into < http:: Request > for Request < State > {
574575 fn into ( self ) -> http:: Request {
575576 self . req
576577 }
577578}
578579
580+ #[ allow( clippy:: from_over_into) ]
579581impl < State : Default > Into < Request < State > > for http_types:: Request {
580582 fn into ( self ) -> Request < State > {
581583 Request :: new ( State :: default ( ) , self , Vec :: < Params > :: new ( ) )
582584 }
583585}
584586
585- // NOTE: From cannot be implemented for this conversion because `State` needs to
586- // be constrained by a type.
587+ #[ allow( clippy:: from_over_into) ]
587588impl < State : Clone + Send + Sync + ' static > Into < Response > for Request < State > {
588589 fn into ( mut self ) -> Response {
589590 let mut res = Response :: new ( StatusCode :: Ok ) ;
Original file line number Diff line number Diff line change @@ -356,6 +356,7 @@ impl AsMut<http::Headers> for Response {
356356 }
357357}
358358
359+ #[ allow( clippy:: from_over_into) ]
359360impl Into < http:: Response > for Response {
360361 fn into ( self ) -> http_types:: Response {
361362 self . res
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ impl ResponseBuilder {
7777 }
7878}
7979
80+ #[ allow( clippy:: from_over_into) ]
8081impl Into < Response > for ResponseBuilder {
8182 fn into ( self ) -> Response {
8283 self . build ( )
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ fn json() -> tide::Result<()> {
7979 let mut counter: Counter = req. body_json ( ) . await . unwrap ( ) ;
8080 assert_eq ! ( counter. count, 0 ) ;
8181 counter. count = 1 ;
82- Ok ( Body :: from_json ( & counter) ? )
82+ Body :: from_json ( & counter)
8383 } ) ;
8484 app. listen ( ( "localhost" , port) ) . await ?;
8585 Result :: < ( ) , http_types:: Error > :: Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments