🚚 Rename alter_...(...) functions to set_...(...)
This commit is contained in:
parent
dfb34d2e36
commit
fea6c2f69e
42 changed files with 314 additions and 312 deletions
|
|
@ -31,7 +31,7 @@ impl OptionClasses {
|
|||
// OptionClasses BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_value(&mut self, op: ClassesOp, classes: impl Into<String>) -> &mut Self {
|
||||
pub fn set_value(&mut self, op: ClassesOp, classes: impl Into<String>) -> &mut Self {
|
||||
let classes: String = classes.into();
|
||||
let classes: Vec<&str> = classes.split_ascii_whitespace().collect();
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ impl<C: ComponentTrait> OptionComponent<C> {
|
|||
// OptionComponent BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_value(&mut self, component: Option<C>) -> &mut Self {
|
||||
pub fn set_value(&mut self, component: Option<C>) -> &mut Self {
|
||||
if let Some(component) = component {
|
||||
self.0 = Some(TypedComponent::with(component));
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ impl OptionId {
|
|||
// OptionId BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_value(&mut self, value: impl Into<String>) -> &mut Self {
|
||||
pub fn set_value(&mut self, value: impl Into<String>) -> &mut Self {
|
||||
self.0 = Some(value.into().trim().replace(' ', "_"));
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ impl OptionName {
|
|||
// OptionName BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_value(&mut self, value: impl Into<String>) -> &mut Self {
|
||||
pub fn set_value(&mut self, value: impl Into<String>) -> &mut Self {
|
||||
self.0 = Some(value.into().trim().replace(' ', "_"));
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ impl OptionString {
|
|||
// OptionString BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_value(&mut self, value: impl Into<String>) -> &mut Self {
|
||||
pub fn set_value(&mut self, value: impl Into<String>) -> &mut Self {
|
||||
self.0 = Some(value.into().trim().to_owned());
|
||||
self
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ impl OptionTranslated {
|
|||
// OptionTranslated BUILDER.
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_value(&mut self, value: L10n) -> &mut Self {
|
||||
pub fn set_value(&mut self, value: L10n) -> &mut Self {
|
||||
self.0 = value;
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue