martinzink commented on code in PR #2220:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2220#discussion_r3777291661
##########
minifi_rust/extensions/minifi_rs_playground/src/processors/generate_flow_file/properties.rs:
##########
@@ -15,64 +15,34 @@
// specific language governing permissions and limitations
// under the License.
-use minifi_native::{Property, StandardPropertyValidator};
+use super::DataFormat;
+use minifi_native::{DataSize, Property};
-pub(crate) const FILE_SIZE: Property = Property {
- name: "File Size",
- description: "The size of the file that will be used",
- is_required: true,
- is_sensitive: false,
- supports_expr_lang: true,
- default_value: Some("1 kB"),
- validator: StandardPropertyValidator::DataSizeValidator,
- allowed_values: &[],
- allowed_type: None,
-};
+pub(crate) const FILE_SIZE: Property<DataSize> =
+ Property::new("File Size", "The size of the file that will be used")
+ .supports_expression_language()
+ .with_default("1 kB");
-pub(crate) const BATCH_SIZE: Property = Property {
- name: "Batch Size",
- description: "The number of FlowFiles to be transferred in each
invocation",
- is_required: true,
- is_sensitive: false,
- supports_expr_lang: false,
- default_value: Some("1"),
- validator: StandardPropertyValidator::U64Validator,
- allowed_values: &[],
- allowed_type: None,
-};
+pub(crate) const BATCH_SIZE: Property<u64> = Property::new(
+ "Batch Size",
+ "The number of FlowFiles to be transferred in each invocation",
+)
+.with_default("1");
Review Comment:
it doesnt seem that way no, cargo fmt formatted this i think its based on
this
> [Multi-line
elements](https://doc.rust-lang.org/style-guide/expressions.html#multi-line-elements)
If any element in a chain is formatted across multiple lines, put that
element and any later elements on their own lines.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]