Skip to content

Is "nodelist" (corosync.conf) represented better as an object instead of a list? #132

Answered by fabriziosestito
scmschmidt asked this question in Q&A
Discussion options

You must be logged in to vote

@scmschmidt @pirat013 we've added Array.find to the expectation language. See here: https://rhai.rs/book/language/arrays.html?highlight=array#built-in-functions

nodelist[nodelist.index_of(|x| x.nodeid == 1)]

becomes

nodelist.find(|x| x.nodeid == 1)

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@scmschmidt
Comment options

@dottorblaster
Comment options

@scmschmidt
Comment options

Comment options

You must be logged in to vote
4 replies
@scmschmidt
Comment options

@fabriziosestito
Comment options

@fabriziosestito
Comment options

@scmschmidt
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by fabriziosestito
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants