Skip to content

mwapi: Expand types accepted as parameters by get() and post()

legoktm requested to merge more-param-types into master

The following types are all now accepted as parameters:

  • Vec<(P, Q)>
  • &Vec<(P, Q)>
  • &[(P, Q)]
  • &[(P, Q); const LENGTH: usize]
  • HashMap<P, Q>
  • &HashMap<P, Q>

where P and Q are Display.

This will hopefully make it more convenient regardless of what the user is doing to be in the correct format. The main motivation for this is that we're using HashMaps inside mwbot's new generators so we don't need to turn them into Vecs first.

Fixes #24 (closed).

Merge request reports