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

Add serde feature #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add serde feature #12

wants to merge 2 commits into from

Conversation

wspeirs
Copy link

@wspeirs wspeirs commented Sep 5, 2023

  • Can serialize and deserialize a Pattern with the feature enabled
  • Adds method to create a string from a Pattern

* Can serialize and deserialize a Pattern with the feature enabled
* Adds method to create a string from a Pattern
@hoijui
Copy link

hoijui commented Dec 18, 2023

I came here to suggest the same!

I am currently using wildmatch, and am looking for alternatives because it too does not support this.
glob neither supports serde.

Serde support is important for me, because I use glob patterns in my config, and that config can be loaded and saved to a file, using serde. I bet that is something that many clients of glob libraries will want to do.

src/lib.rs Outdated

}

impl<S> Pattern<S> {
Copy link

Choose a reason for hiding this comment

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

Could/Should this not rather be impl<S> Display for Pattern<S> {?

Copy link

@hoijui hoijui Dec 18, 2023

Choose a reason for hiding this comment

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

haha! :D
you changed it while I was commenting!
perfect!

@cassaundra
Copy link
Owner

Catching up on backlog here. Happy to merge this with the changes suggested, looks like I'm able to push them, but will wait just in case OP would like to

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