File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,11 @@ use crate::utils::*;
1111#[ derive( Clone ) ]
1212struct ResourceInfo {
1313 method_name : syn:: Ident ,
14+ #[ allow( dead_code) ]
1415 resource_name : String ,
16+ #[ allow( dead_code) ]
1517 description : String ,
18+ #[ allow( dead_code) ]
1619 uri_template : String ,
1720 path_pattern : String ,
1821 param_names : Vec < String > ,
@@ -31,7 +34,7 @@ fn parse_uri_template(uri_template: &str) -> (String, Vec<String>) {
3134 // treat everything after :// as the path since there's no host part
3235 // Add leading slash to make it a proper matchit path
3336 return (
34- format ! ( "/{}" , after_scheme ) ,
37+ format ! ( "/{after_scheme}" ) ,
3538 extract_uri_parameters ( after_scheme) ,
3639 ) ;
3740 } else {
@@ -41,7 +44,7 @@ fn parse_uri_template(uri_template: &str) -> (String, Vec<String>) {
4144 } else {
4245 // Add leading slash
4346 return (
44- format ! ( "/{}" , uri_template ) ,
47+ format ! ( "/{uri_template}" ) ,
4548 extract_uri_parameters ( uri_template) ,
4649 ) ;
4750 }
@@ -58,7 +61,7 @@ fn extract_uri_parameters(path: &str) -> Vec<String> {
5861 while let Some ( ch) = chars. next ( ) {
5962 if ch == '{' {
6063 let mut param_name = String :: new ( ) ;
61- while let Some ( ch ) = chars. next ( ) {
64+ for ch in chars. by_ref ( ) {
6265 if ch == '}' {
6366 break ;
6467 }
You can’t perform that action at this time.
0 commit comments