diff options
| author | KyleMiles <krm504@nyu.edu> | 2024-05-10 12:05:45 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2024-05-10 12:05:45 -0400 |
| commit | 0ace079eb70b0c999914a1e95a3eb1324a3b19d8 (patch) | |
| tree | f87d9f7a3e510f153a3fbbbe58160d13cd2c51ad /rust/src/function.rs | |
| parent | adde27cfa50f7ef70821cecb71967d538962f7b3 (diff) | |
Rust API : Misc cargo clippy fixes
Diffstat (limited to 'rust/src/function.rs')
| -rw-r--r-- | rust/src/function.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/function.rs b/rust/src/function.rs index f57d2fe3..04be898f 100644 --- a/rust/src/function.rs +++ b/rust/src/function.rs @@ -321,8 +321,8 @@ impl Function { let confidence = variables.confidence; let vars = std::slice::from_raw_parts(variables.vars, variables.count); - for i in 0..variables.count { - result.push(Variable::from_raw(vars[i])); + for var in vars.iter().take(variables.count) { + result.push(Variable::from_raw(*var)); } BNFreeParameterVariables(&mut variables); |
