Skip to content

Commit 8192f4d

Browse files
committed
chore: clippy updates
1 parent a7b0c1a commit 8192f4d

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

src/examples/module10/rust_app/src/core/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(())

src/solutions/Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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

src/solutions/module10/rust_app/src/core/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/solutions/module9/rust_app/src/core/core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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(())

0 commit comments

Comments
 (0)