Ziyang Hu 1 year ago
parent 56123c172e
commit 2a5e568d58

@ -201,6 +201,7 @@ pub(crate) fn parse_sys(
"dim" => { "dim" => {
vec_dim = opt_val vec_dim = opt_val
.as_str() .as_str()
.trim()
.parse() .parse()
.map_err(|e| miette!("Invalid vec_dim: {}", e))?; .map_err(|e| miette!("Invalid vec_dim: {}", e))?;
} }
@ -233,12 +234,14 @@ pub(crate) fn parse_sys(
"ef_construction" | "ef" => { "ef_construction" | "ef" => {
ef_construction = opt_val ef_construction = opt_val
.as_str() .as_str()
.trim()
.parse() .parse()
.map_err(|e| miette!("Invalid ef_construction: {}", e))?; .map_err(|e| miette!("Invalid ef_construction: {}", e))?;
} }
"m_neighbours" | "m" | "M" => { "m_neighbours" | "m" | "M" => {
max_elements = opt_val max_elements = opt_val
.as_str() .as_str()
.trim()
.parse() .parse()
.map_err(|e| miette!("Invalid max_elements: {}", e))?; .map_err(|e| miette!("Invalid max_elements: {}", e))?;
} }

Loading…
Cancel
Save