cleanup
This commit is contained in:
parent
2c71ad5aeb
commit
71667cfafe
1 changed files with 0 additions and 10 deletions
|
|
@ -83,13 +83,3 @@ pub fn entity_text(entity: &EntityType) -> Option<String> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Apply new text content to a cloned entity, returning the updated entity.
|
|
||||||
pub fn set_entity_text(mut entity: EntityType, new_text: &str) -> Option<EntityType> {
|
|
||||||
match &mut entity {
|
|
||||||
EntityType::Text(t) => { t.value = new_text.to_string(); Some(entity) }
|
|
||||||
EntityType::MText(t) => { t.value = new_text.to_string(); Some(entity) }
|
|
||||||
EntityType::AttributeDefinition(a) => { a.default_value = new_text.to_string(); Some(entity) }
|
|
||||||
EntityType::AttributeEntity(a) => { a.set_value(new_text.to_string()); Some(entity) }
|
|
||||||
_ => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue