Refactor relationship type retrieval in character workers: Simplify the extraction of relationship types in CharacterCreationWorker, EventsWorker, and UserCharacterWorker by streamlining the use of and_then for better readability and maintainability.
This commit is contained in:
@@ -1797,8 +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());
|
||||
.and_then(|v| v.as_str().map(|s| s.to_string()));
|
||||
|
||||
// Logging: Relationship wurde gelöscht
|
||||
eprintln!(
|
||||
|
||||
Reference in New Issue
Block a user