Some improvements on config file and db file #104
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @grunch @bilthon !
Some improvements on config files and db file:
MOSTRO_CONFIG
variable fromlazy_static
toOnceLock
which is included in std lib now. Maybe you could have to update to latest Rust. Next time I will try to useOnceCell
to remove also variable ofRATE_EVENT_LIST
from lazy static so we can remove the not maintained crate.settings.toml
tosettings.tpl.toml
in .init_db.sh for compatibility and made config path the one in which db file is searched at startup.Now what is happening is that user will launch in root folder the db init then launches mostro that creates path for settings and db file, then will print out to copy both file in the folder.
Maybe we could improve in some way that file copy and db creation are automated, but I don't if it's a good idea...
Waiting for advice... ;)