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

Transition to stable Rust version #28

Open
crumblingstatue opened this issue Sep 15, 2022 · 3 comments
Open

Transition to stable Rust version #28

crumblingstatue opened this issue Sep 15, 2022 · 3 comments
Milestone

Comments

@crumblingstatue
Copy link
Owner

It's much easier to get packaged in distributions, etc, if we use a stable Rust version.
This is a long term goal, for now nightly features are considered useful for speeding up development.

@crumblingstatue crumblingstatue added this to the 1.0 milestone Sep 15, 2022
@GabrieleInvernizzi
Copy link

Hello, if you are intrested I wanted to help to rewrite the try_blocks to stable Rust.
To make the smallest changes possible my idea was to translate try_blocks to closures to keep the ease of use of the ? operator.

An example would be to rewrite a try_block from this: (from app.rs):

let result: anyhow::Result<()> = try {
    let amount = src_clone.read(&mut buf)?;
    buf.truncate(amount);
    tx.send(buf)?;
};

To something like this:

let result = || -> anyhow::Result<()> {
    let amount = src_clone.read(&mut buf)?;
    buf.truncate(amount);
    tx.send(buf)?;
    Ok(())
}();

If you are interested let me know.

@crumblingstatue
Copy link
Owner Author

Thank you, this is something to consider, but for now hexerator depends on a lot of different nightly features, so it's not high priority to stop using them.
Ideally, when the time comes to start using stable Rust, try blocks will be a stable feature.
Although that might be too optimistic of an assumption.

Thank you for your suggestion though!

@GabrieleInvernizzi
Copy link

No problem, if there is something else I can help with let me know!

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