Skip to content

Implement Clone and Debug for Segtree #144

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

Open
NotLeonian opened this issue Feb 22, 2025 · 2 comments
Open

Implement Clone and Debug for Segtree #144

NotLeonian opened this issue Feb 22, 2025 · 2 comments

Comments

@NotLeonian
Copy link
Contributor

Implement the Clone and Debug traits for Segtree.
Since M::S has the Clone constraint, the Clone trait can be derived.

For the Debug trait, I propose adding use std::fmt::{Debug, Error, Formatter, Write}; and defining the fmt function based on the existing implementation in LazySegtree, excluding the output for self.lz.
In this approach, we should take into account that the Debug implementation for LazySegtree includes a comment saying // TODO is it useful? .

@NotLeonian
Copy link
Contributor Author

It makes sense to align the Debug implementation for Segtree with LazySegtree #143 once the discussion is settled.

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

No branches or pull requests

2 participants
@NotLeonian and others