lib/poset: avoid useless call of `to_a` in `add_edge`