Skip to content
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

chore: tidy some interfaces and naming #22

Merged
merged 1 commit into from
Aug 2, 2024
Merged

chore: tidy some interfaces and naming #22

merged 1 commit into from
Aug 2, 2024

Conversation

tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Aug 2, 2024

No description provided.

@@ -124,26 +124,30 @@ impl Dispatch {
/// This struct implements [log::Log] to bridge Logforth's logging implementations
/// with the [log] crate.
#[derive(Debug)]
pub struct Logger<const APPEND: bool = true> {
Copy link
Contributor Author

@tisonkun tisonkun Aug 2, 2024

Choose a reason for hiding this comment

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

Add const parameter will cause logger cannot be reused.

For example,

let mut logger = Logger::new();

// ... do something

// compile error; cannot assign `Logger<true>` to `Logger<false>`.
logger = logger.dispatch( ... ); 

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.

1 participant