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

Configure required features for examples #403

Merged
merged 1 commit into from Jul 2, 2021

Conversation

robinkrahl
Copy link
Contributor

Instead of manually checking for required features in the hyphenation
and termwidth examples, we can configure the required features in
Cargo.toml. This makes the examples easier to read and maintain.

@mgeisler
Copy link
Owner

mgeisler commented Jul 1, 2021

Oh yes, that would be much better!

@robinkrahl
Copy link
Contributor Author

Hmm, it seems to break the CI. I’ll try to fix it.

Instead of manually checking for required features in the hyphenation
and termwidth examples, we can configure the required features in
Cargo.toml.  This makes the examples easier to read and maintain.
@robinkrahl
Copy link
Contributor Author

I’ve added some imports that I had accidentally removed, now it’s working again.

@mgeisler mgeisler merged commit 48320ec into mgeisler:master Jul 2, 2021
@mgeisler
Copy link
Owner

mgeisler commented Jul 2, 2021

Thanks, that's much nicer!

@github-actions github-actions bot mentioned this pull request Feb 27, 2022
@mgeisler
Copy link
Owner

Hi Robin,

Just a FYI in case you run into this too... :-) I got a weird error when trying to publish the crate after this:

% cargo publish --dry-run
    Updating crates.io index
   Packaging textwrap v0.15.0 (/home/mg/src/textwrap)
   Verifying textwrap v0.15.0 (/home/mg/src/textwrap)
error: failed to verify package tarball

Caused by:
  failed to parse manifest at `/home/mg/src/textwrap/target/package/textwrap-0.15.0/Cargo.toml`

Caused by:
  can't find `hyphenation` example at `examples/hyphenation.rs` or
  `examples/hyphenation/main.rs`. Please specify example.path if you
  want to use a non-default path.

I could fix it by specifying the path explicitly: #444.

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.

None yet

2 participants