Skip to content
This repository was archived by the owner on Mar 24, 2022. It is now read-only.

replace empty constructor w/ default impl#378

Merged
iximeow merged 3 commits intobytecodealliance:masterfrom
data-pup:embed-ctx-default
Jan 21, 2020
Merged

replace empty constructor w/ default impl#378
iximeow merged 3 commits intobytecodealliance:masterfrom
data-pup:embed-ctx-default

Conversation

@data-pup
Copy link
Copy Markdown
Member

This is another "tiny lint fix I found while looking around at things" PR.

Rather than using a CtxMap::new() constructor, we can implement the Default trait, and use that instead.

@acfoltzer
Copy link
Copy Markdown
Contributor

How about both? We could define one in terms of the other, too. But the standard library has so many instances of Thing::new() that I usually reach for that rather than Thing::default()

@data-pup
Copy link
Copy Markdown
Member Author

How about both? We could define one in terms of the other, too.

That's a good point! Will do.

@iximeow
Copy link
Copy Markdown
Contributor

iximeow commented Jan 21, 2020

🧹 the merge-approved-but-forgotten-PRs fairy strikes 🧹

@iximeow iximeow merged commit f25535e into bytecodealliance:master Jan 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants