Skip to content

Conversation

tobimichael96
Copy link
Contributor

@tobimichael96 tobimichael96 commented Oct 7, 2019

This might be a potential fix for #355

I added the option called debug-login (you might want to rename this) which shows the given username, password and password command.

Rewrote some of the code and used a new function for this.

(This is a new pull request because I fucked up some things on the other one... it's possible that this will happen here as well... I'm sorry for that!)

Edit: After I fucked up again, you might need to tell me how to do it properly because at this point it's getting embarrassing...

@mainrs
Copy link
Member

mainrs commented Oct 7, 2019

Wow, what a PR streak! :)

So I've thought about this for some time today. I feel like the flag should not be a value within the config file and only a CLI flag as it's used for debugging only and not for configuration.

So the ideal case would be to move the Debug implementation to CliConfig. This is needed as SharedConfigValues is part of CliConfig. And we could then use your code there.

I am actually not sure if that would work without problems whatsoever without having the compiler spitting out some errors. So I would rather try this one out at the weekend. That way I am wasting some time and not you if it doesn't work ;)

@tobimichael96
Copy link
Contributor Author

tobimichael96 commented Oct 7, 2019

Wow, what a PR streak! :)

So I've thought about this for some time today. I feel like the flag should not be a value within the config file and only a CLI flag as it's used for debugging only and not for configuration.

So the ideal case would be to move the Debug implementation to CliConfig. This is needed as SharedConfigValues is part of CliConfig. And we could then use your code there.

I am actually not sure if that would work without problems whatsoever without having the compiler spitting out some errors. So I would rather try this one out at the weekend. That way I am wasting some time and not you if it doesn't work ;)

I agree with you, that makes a lot more sense.
I could play around a bit with it and maybe post some snippets in here (to avoid another PR and commit massacre :D), but this might go above my understanding of Rust.

Glad my effort was at least worth something. :)

@mainrs
Copy link
Member

mainrs commented Oct 7, 2019

You can create as many commits as you like. I Squash them together before merging anyway :) People always underestimate contributions they make :)

And there is no better way to learn a new language then trying out ;)

@tobimichael96
Copy link
Contributor Author

I just looked at the code and I think while you are rewriting the Debug implementation anyway we should change the line I added in #357.

From .field("no-audio-cache", &self.no_audio_cache) to .field("audio-cache", &!self.no_audio_cache) in line 349.

This might clear things up in the output.

@mainrs
Copy link
Member

mainrs commented Oct 18, 2019

Thanks for your effort Tobi! I think a move of the Debug might be a better option though. So I’ll close this one for now.

@mainrs mainrs closed this Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants