Skip to content

Use `Cow` for input strings and arrays

Gabriel M requested to merge crash-g/tbot:master into owned-values

This MR aims to replace &'a T with Cow<'a, T> in all structs that are handled by users.

Modules to refactor:

  • types::inline_query::result
  • types::input_file
  • types::input_message_content
  • types::parameters
  • methods
  • contexts
  • types::keyboard (WON'T DO)

For the moment, unnecessary changes are kept to a minimum. Later, user APIs and examples should be examined and refactored to improve ergonomics.

Solves #50 (closed)

Edited by Artem Starikov

Merge request reports