We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fae8a6 commit f0a4027Copy full SHA for f0a4027
1 file changed
crates/stackable-operator/src/v2/flask_config_writer.rs
@@ -78,8 +78,8 @@ impl PythonType {
78
&& value
79
.chars()
80
.next()
81
- .filter(|c| !c.is_ascii_digit())
82
- .is_some()
+ .as_ref()
+ .is_some_and(|c| !c.is_ascii_digit())
83
{
84
Ok(value.to_string())
85
} else {
@@ -141,8 +141,7 @@ where
141
// If an option cannot be mapped to a Python type then it is a config override and treated
142
// as Python expression.
143
let content = O::from_str(name)
144
- .map(|option| option.python_type())
145
- .unwrap_or(PythonType::Expression)
+ .map_or(PythonType::Expression, |option| option.python_type())
146
.convert_to_python(value)?;
147
148
writeln!(writer, "{variable} = {content}").context(WriteConfigSnafu)?;
0 commit comments