-
Notifications
You must be signed in to change notification settings - Fork 70
Dont start #332
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
Comments
Windows 10 error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied For more information about this error, try |
Yep, adding those generics is a breaking change |
As a workaround I've added this crate to my zip = "2.5.0" EDIT: doesn't really work for deps of deps, can't find a solution 😕 |
On windows 7 this variant is not working |
We're seeing this issue in a dependency of a dependency who is fixed to the major version: zip = { version = "2" } I would expect this breaking change for Zip2 to be |
Workaround suggestion:
git clone -b v2.5.0 https://github.com/zip-rs/zip2
[replace]
"zip:2.6.0" = { path = "./zip2" } |
This worked for us: [patch.crates-io]
zip = { git = "https://github.com/zip-rs/zip2", rev = "77cde6a" }
[patch.'https://github.com/zip-rs/zip2']
zip = { git = "https://github.com//zip-rs/zip2", rev = "77cde6a" } note the extra |
This works around the semver breakage reported in zip-rs/zip2#332
I suggest 2.6.1 be yanked and republished as 3.0.0 per @ddimaria |
Dont working |
@AveNRU this may help, cargo update -p zip --precise 2.5.0 However, if you do a |
Maybe I am doing it wrong but this didn't work for me on windows. I added this to my rust project that is using calamine. Do I need to clone calamine itself and add these lines to the calamine build and then link to my local build? |
This approach doesn't require a clone of calamine. This worked on mac and linux, but I would expect windows would work as well. You might try deleting your lock file and/or doing a |
For those who might be experiencing build issues, here’s a summary of possible workarounds: 1. Temporary solutionFor now, doing the following fixes it: $ cargo update -p zip --precise 2.5.0 But it'll break again if you run 2. Patch dependency version# Cargo.toml
[patch.crates-io]
zip = { git = "https://github.com/zip-rs/zip2", tag = "v2.5.0" } Due to a limitation in Cargo (rust-lang/cargo#5478), we unfortunately can’t use the crates.io index when changing dependency versions. As a result, we had to use the git protocol. 3. Patch dependency version (registry)For those who prefer not to use the # Cargo.toml
[patch.crates-io]
zip = { version = "=2.5.0", registry = "crates-io-2" } # .cargo/config.toml
[registries]
crates-io-2 = { index = "sparse+https://index.crates.io/" }
# Required due to https://github.com/rust-lang/cargo/issues/5478 This can lead to the same sub-dependency being downloaded from both crates-io and crates-io-2. It’s not a major issue to download the same dependency twice, but just be aware of it. |
Fixed in 3.0.0 by the version bump, and versions 2.6.0 and 2.6.1 are now yanked. |
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> C:\Users\AveN.cargo\registry\src\index.crates.io-6f17d22bba15001f\calamine-0.26.1\src\xlsb\mod.rs:603:18
|
603 | r: BufReader<ZipFile<'a>>,
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter:
R
--> C:\Users\AveN.cargo\registry\src\index.crates.io-6f17d22bba15001f\zip-2.6.0\src\read.rs:252:12
|
252 | pub struct ZipFile<'a, R: Read> {
| ^^^^^^^ -
help: add missing generic argument
|
603 | r: BufReader<ZipFile<'a, R>>,
| +++
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> C:\Users\AveN.cargo\registry\src\index.crates.io-6f17d22bba15001f\calamine-0.26.1\src\xlsx\mod.rs:26:52
|
26 | pub(crate) type XlReader<'a> = XmlReader<BufReader<ZipFile<'a>>>;
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter:
R
--> C:\Users\AveN.cargo\registry\src\index.crates.io-6f17d22bba15001f\zip-2.6.0\src\read.rs:252:12
|
252 | pub struct ZipFile<'a, R: Read> {
| ^^^^^^^ -
help: add missing generic argument
|
26 | pub(crate) type XlReader<'a> = XmlReader<BufReader<ZipFile<'a, R>>>;
| +++
error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
--> C:\Users\AveN.cargo\registry\src\index.crates.io-6f17d22bba15001f\calamine-0.26.1\src\ods.rs:24:42
|
24 | type OdsReader<'a> = XmlReader<BufReader<ZipFile<'a>>>;
| ^^^^^^^ expected 1 generic argument
|
note: struct defined here, with 1 generic parameter:
R
--> C:\Users\AveN.cargo\registry\src\index.crates.io-6f17d22bba15001f\zip-2.6.0\src\read.rs:252:12
|
252 | pub struct ZipFile<'a, R: Read> {
| ^^^^^^^ -
help: add missing generic argument
|
24 | type OdsReader<'a> = XmlReader<BufReader<ZipFile<'a, R>>>;
| +++
For more information about this error, try
rustc --explain E0107
.Rust 1.75.0 Windows 7
[package]
name = "Powerscript"
version = "0.1.0"
edition = "2021"
[dependencies]
lazy_static = "1.4.0"
regex = "1.11.1"
calamine = "0.26.1"
rust_xlsxwriter = "0.85.0"
encoding_rs = "0.8.35"
encoding_rs_io = "0.1.7"
csv = "=1.3.1"
csv2xlsx = "0.3.0"
rust_decimal = "1.36.0"
rust_decimal_macros = "1.36.0"
The text was updated successfully, but these errors were encountered: