-
-
Notifications
You must be signed in to change notification settings - Fork 41
Conversation
The test failure seems to be related to out of date dependencies. See line 2292 and onwards. |
It might make sense to use app_dirs for this. |
I think that crate is better suited for user-level applications, because it relies on the xdg crate, which, as mentioned in the issue (#196), looks for system level config files in |
Use a clone-on-write to avoid unnecessary creation of path buffers, and use if let instead of methods on Option to increase readability and decrease levels of nesting
I added some minor improvements to this PR. Is it ready to be merged? |
Jimmy currently isn't around. I could merge this, but I'm not sure I should given that I don't really want to maintain the homeserver parts of ruma. |
This repository will soon be archived (I'll write a blog post about it and update README.md in the coming days). There is another homeserver project based on our lower-level crates in the works, discussion on that happens in #rustmatrix:koesters.xyz. |
I assume you don't mind me closing the PR then? |
No, go ahead if you want. I haven't closed any of the other PRs yet because I don't think it really makes a difference after the project is archived and I didn't want to pointlessly generate notifications. |
This is a relatively naive implementation that does the same iteration over files but with
/etc/ruma
prepended to the path if none were found in the local directory.Note that the type of
config_path
has been changed fromPath
toPathBuf
to allow for joining the directory with the file name. This could be avoided by simply adding the absolute path of each potential file inetc
toDEFAULT_CONFIG_FILES
, but I considered that a bit too hardcoded.Additionally, I changed
DEFAULT_CONFIG_FILES
from astatic
to aconst
as it's my understanding that it's best practice to useconst
when possible.Should close #196.