File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed
examples/module10/rust_app/src/core
module10/rust_app/src/core
module9/rust_app/src/core Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ impl User {
205205 if !password. chars ( ) . any ( |c| c. is_lowercase ( ) ) {
206206 return Err ( ApplicationError :: ApplicationError ( "Password must contain at least one lowercase letter" . to_string ( ) ) ) ;
207207 }
208- if !password. chars ( ) . any ( |c| c. is_digit ( 10 ) ) {
208+ if !password. chars ( ) . any ( |c| c. is_ascii_digit ( ) ) {
209209 return Err ( ApplicationError :: ApplicationError ( "Password must contain at least one digit" . to_string ( ) ) ) ;
210210 }
211211 Ok ( ( ) )
Original file line number Diff line number Diff line change 1+ [workspace ]
2+ members = [
3+ " module1/rust_app" ,
4+ " module2/rust_app" ,
5+ " module3/rust_app" ,
6+ " module4/rust_app" ,
7+ " module5/rust_app" ,
8+ " module6/rust_app" ,
9+ " module7/rust_app" ,
10+ " module8/rust_app" ,
11+ " module9/rust_app" ,
12+ " module10/rust_app" ,
13+ ]
14+
15+ resolver = " 2" # Use the new feature resolver
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ impl User {
212212 tracing:: Span :: current ( ) . record ( "user.password_is_valid" , "false" ) ;
213213 return Err ( ApplicationError :: ApplicationError ( "Password must contain at least one lowercase letter" . to_string ( ) ) ) ;
214214 }
215- if !password. chars ( ) . any ( |c| c. is_digit ( 10 ) ) {
215+ if !password. chars ( ) . any ( |c| c. is_ascii_digit ( ) ) {
216216 tracing:: Span :: current ( ) . record ( "user.password_is_valid" , "false" ) ;
217217 return Err ( ApplicationError :: ApplicationError ( "Password must contain at least one digit" . to_string ( ) ) ) ;
218218 }
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ impl User {
205205 if !password. chars ( ) . any ( |c| c. is_lowercase ( ) ) {
206206 return Err ( ApplicationError :: ApplicationError ( "Password must contain at least one lowercase letter" . to_string ( ) ) ) ;
207207 }
208- if !password. chars ( ) . any ( |c| c. is_digit ( 10 ) ) {
208+ if !password. chars ( ) . any ( |c| c. is_ascii_digit ( ) ) {
209209 return Err ( ApplicationError :: ApplicationError ( "Password must contain at least one digit" . to_string ( ) ) ) ;
210210 }
211211 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments