Refactor relationship type retrieval in user character workers: Simplify the extraction of relationship types in UserCharacterWorker, CharacterCreationWorker, and EventsWorker by replacing and_then with map for improved readability and consistency.
This commit is contained in:
@@ -436,7 +436,7 @@ impl CharacterCreationWorker {
|
||||
.and_then(|v| v.parse::<i32>().ok());
|
||||
let relationship_type_tr = row
|
||||
.get("relationship_type_tr")
|
||||
.and_then(|v| v.as_str().map(|s| s.to_string()));
|
||||
.map(|s| s.to_string());
|
||||
|
||||
// Logging: Relationship wurde gelöscht
|
||||
eprintln!(
|
||||
|
||||
@@ -1797,7 +1797,7 @@ impl EventsWorker {
|
||||
.and_then(|v| v.parse::<i32>().ok());
|
||||
let relationship_type_tr = row
|
||||
.get("relationship_type_tr")
|
||||
.and_then(|v| v.as_str().map(|s| s.to_string()));
|
||||
.map(|s| s.to_string());
|
||||
|
||||
// Logging: Relationship wurde gelöscht
|
||||
eprintln!(
|
||||
|
||||
@@ -600,7 +600,7 @@ impl UserCharacterWorker {
|
||||
.and_then(|v| v.parse::<i32>().ok());
|
||||
let relationship_type_tr = row
|
||||
.get("relationship_type_tr")
|
||||
.and_then(|v| v.as_str().map(|s| s.to_string()));
|
||||
.map(|s| s.to_string());
|
||||
|
||||
// Logging: Relationship wurde gelöscht
|
||||
eprintln!(
|
||||
|
||||
Reference in New Issue
Block a user