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

Improve echoserver example, bump Rust toolchain to 1.81 #339

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

JuliDi
Copy link
Contributor

@JuliDi JuliDi commented Sep 11, 2024

While trying out the echoserver, I've added some error handling and made the session closable with ctrl+c, which might often be what you want. So I thought upstreaming these changes might be a good thing.

While on it, I took the liberty of bumping the rust toolchain to 1.81, which does not seem to break anything.

- bump rust toolchain to 1.81
- add error handling for echoserver
- make echoserver close session when ctrl+c is received
@JuliDi
Copy link
Contributor Author

JuliDi commented Sep 12, 2024

There is still a clippy lint regarding unused struct fields:

warning: fields `key` and `algo` are never read
   --> russh/src/auth.rs:140:9
    |
139 |     PublicKey {
    |     --------- fields in this variant
140 |         key: CryptoVec,
    |         ^^^
141 |         algo: CryptoVec,
    |         ^^^^
    |
    = note: `CurrentRequest` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
    = note: `#[warn(dead_code)]` on by default

Not sure what that struct is used for and how to fix it. Maybe allow dead_code in there? Or prefix with an underscore?

Regarding rustfmt: should we use a nightly toolchain to run rustfmt? There are still some warnings about nightly-only features.

@Eugeny
Copy link
Owner

Eugeny commented Sep 17, 2024

Thanks! Yes, the nightly rustfmt is still needed for imports_granularity etc.

@Eugeny
Copy link
Owner

Eugeny commented Sep 17, 2024

@all-contributors add @JuliDi for code

@Eugeny Eugeny merged commit 73fa3e5 into Eugeny:main Sep 17, 2024
4 checks passed
Copy link
Contributor

@Eugeny

I've put up a pull request to add @JuliDi! 🎉

Eugeny pushed a commit that referenced this pull request Sep 17, 2024
Adds @JuliDi as a contributor for code.

This was requested by Eugeny [in this
comment](#339 (comment))

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@JuliDi JuliDi deleted the patch-improve-example-bump-toolchain branch September 18, 2024 07:16
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.

2 participants