mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-05 21:02:58 +00:00
fix: enable space string in yaml value (#4286)
* fix: enable space string in yaml value * fix: typo
This commit is contained in:
@@ -182,7 +182,7 @@ fn parse_processor(doc: &yaml_rust::Yaml) -> Result<Arc<dyn Processor>, String>
|
||||
|
||||
pub(crate) fn yaml_string(v: &yaml_rust::Yaml, field: &str) -> Result<String, String> {
|
||||
v.as_str()
|
||||
.map(|s| s.trim().to_string())
|
||||
.map(|s| s.to_string())
|
||||
.ok_or(format!("'{field}' must be a string"))
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ use crate::python::utils::format_py_error;
|
||||
#[test]
|
||||
fn convert_scalar_to_py_obj_and_back() {
|
||||
rustpython_vm::Interpreter::with_init(Default::default(), |vm| {
|
||||
// this can be in `.enter()` closure, but for clearity, put it in the `with_init()`
|
||||
// this can be in `.enter()` closure, but for clarity, put it in the `with_init()`
|
||||
let _ = PyVector::make_class(&vm.ctx);
|
||||
})
|
||||
.enter(|vm| {
|
||||
@@ -422,7 +422,7 @@ fn test_vm() {
|
||||
|
||||
rustpython_vm::Interpreter::with_init(Default::default(), |vm| {
|
||||
vm.add_native_module("udf_builtins", Box::new(greptime_builtin::make_module));
|
||||
// this can be in `.enter()` closure, but for clearity, put it in the `with_init()`
|
||||
// this can be in `.enter()` closure, but for clarity, put it in the `with_init()`
|
||||
let _ = PyVector::make_class(&vm.ctx);
|
||||
})
|
||||
.enter(|vm| {
|
||||
|
||||
Reference in New Issue
Block a user