Add a comment about non-panicking of splitn().next().unwrap()
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
This commit is contained in:
parent
39b80cb7c0
commit
1d6c860277
|
@ -394,6 +394,7 @@ impl Options {
|
|||
.iter()
|
||||
.map(|s| {
|
||||
let mut kv = s.splitn(2, '=');
|
||||
// never panics because `splitn` always returns at least one element
|
||||
let k = kv.next().unwrap().to_string();
|
||||
let v = kv.next().unwrap_or("true").to_string();
|
||||
(k, v)
|
||||
|
|
Loading…
Reference in a new issue