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 04d0c4f commit 2586e46Copy full SHA for 2586e46
1 file changed
crates/base/src/lib.rs
@@ -1,28 +1,4 @@
1
-use tucana::shared::{FlowSetting, value::Kind};
2
-
3
pub mod config;
4
pub mod runner;
5
pub mod store;
6
pub mod traits;
7
8
-pub fn extract_flow_setting_field(
9
- settings: &Vec<FlowSetting>,
10
- def_key: &str,
11
- field_name: &str,
12
-) -> Option<String> {
13
- settings.iter().find_map(|setting| {
14
- if setting.flow_setting_id != def_key {
15
- return None;
16
- }
17
18
- let obj = setting.object.as_ref()?;
19
- obj.fields.iter().find_map(|(k, v)| {
20
- if k == field_name
21
- && let Some(Kind::StringValue(s)) = &v.kind
22
- {
23
- return Some(s.clone());
24
25
- None
26
- })
27
28
-}
0 commit comments