Skip to content

Derive/implement Debug for Config and AndroidLogger #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

MarijnS95
Copy link
Member

Closes #79

Allows these structs to be printed, useful for supposedly the log4rs crate which requires this to be implemented on AndroidLogger.

/// Create a new logger with default config
fn default() -> AndroidLogger {
AndroidLogger {
config: OnceLock::from(Config::default()),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what Default already does on OnceLock. Since that's the only member, we can simply have #[derive(Default)] struct AndroidLogger ....

@Nercury
Copy link
Collaborator

Nercury commented Mar 4, 2025

@MarijnS95 Let me know when you are ready to merge, ping me.

@MarijnS95
Copy link
Member Author

@Nercury thanks, I think this is ready for review. The only open comment was meant for educational purposes to reviewers (to understand why I was making a drive-by change), not something that still needs to change it seems 🙂

@Nercury
Copy link
Collaborator

Nercury commented Mar 4, 2025

Whoops, merge conflict.

Allows these structs to be printed, useful for supposedly the `log4rs`
crate which requires this to be implemented on `AndroidLogger`.
@MarijnS95 MarijnS95 force-pushed the marijn/unconditionally-derive-debug branch from b98be74 to cac592f Compare March 4, 2025 14:25
@MarijnS95 MarijnS95 requested a review from Nercury March 4, 2025 14:25
@Nercury Nercury merged commit b4f7783 into master Mar 4, 2025
24 checks passed
@MarijnS95 MarijnS95 deleted the marijn/unconditionally-derive-debug branch March 4, 2025 15:11
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.

3 participants