Repository: static-web-server/static-web-server (language: rust)

Issue:
error: the item `TryFrom` is imported redundantly
### Search for duplicate issues

- [X] I already searched, and this issue is not a duplicate.

### Issue scope

Linux (E.g. Arch Linux, Debian, Alpine, etc)

### Describe the bug

```
   Compiling static-web-server v2.27.0 (/home/yonas/.cargo/git/checkouts/static-web-server-d0678737845d2249/2286e45)
error: the item `TryFrom` is imported redundantly
  --> src/cors.rs:16:33
   |
16 | use std::{collections::HashSet, convert::TryFrom};
   |                                 ^^^^^^^^^^^^^^^^
  --> /rustc/0ecbd0605770f45c9151715e66ba2b3cae367fcb/library/std/src/prelude/mod.rs:129:13
   |
   = note: the item `TryFrom` is already defined here
   |
note: the lint level is defined here
  --> src/lib.rs:99:9
   |
99 | #![deny(warnings)]
   |         ^^^^^^^^
   = note: `#[deny(unused_imports)]` implied by `#[deny(warnings)]`

error: could not compile `static-web-server` (lib) due to 1 previous error
```

### How to reproduce it

1. git clone ...
2. cargo build --release

### Expected behavior

Should compile without error.

### Complementary information

_No response_

### Build target

x86_64-unknown-linux-gnu

### Environment and specs

- [v2.27.0] **static-web-server:**
- [Ubuntu 23] **OS:**
- [x86_64] **Arch:**

### Additional context

_No response_


Discussion / hints:
What Rust version are you using?
Because interestingly I built SWS successfully in Debian 12 with Rust 1.75/1.76.

What if you just remove the `std::convert::TryFrom` from `src/cors.rs:16:33`, does it work?
> What Rust version are you using?

rustc 1.78.0-nightly (0ecbd0605 2024-02-25)

> What if you just remove the `std::convert::TryFrom` from `src/cors.rs:16:33`, does it work?

Yes.
I see, then just feel free to submit a patch for nightly.

Fix patch:
diff --git a/src/cors.rs b/src/cors.rs
index d6185325..4a1233be 100644
--- a/src/cors.rs
+++ b/src/cors.rs
@@ -13,7 +13,7 @@ use headers::{
     HeaderMapExt, HeaderName, HeaderValue, Origin,
 };
 use http::header;
-use std::{collections::HashSet, convert::TryFrom};
+use std::collections::HashSet;
 
 /// It defines CORS instance.
 #[derive(Clone, Debug)]


Test patch: