Skip to content
Snippets Groups Projects

Config file

Merged squimmy requested to merge config-file into master

This change moves (most of) the config stuff into config files that are loaded at runtime.

It seems to work okay but there are a couple of problems:

  • I don't like that the contents of the config file are kept around as a separate static string, but it seems like the deserializer expects a string with equivalent lifetime to the value it deserializes to. This strikes me as a little odd. Is there some sort of workaround to this? I glanced over the toml source and it looks like all the deserialization methods have the same lifetime parameters.

  • discord_token is still being loaded at compile time, which sucks. In theory we should be able to load it as a static just like CONFIG_FILE, but I get a confusing type-error when I try that, so maybe someone who knows more about rust can help me out there.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
Please register or sign in to reply