Failed to find Cargo.toml


#1

I’m trying to use below library in github in my rust code

https://github.com/kteza1/rust-mosquitto

My current Cargo.toml is as below

[package]
name = "HomeDaemon"
version = "0.1.0"
authors = ["RTR <k.teza1@gmail.com>"]

[dependencies.mosquitto]
git = "https://github.com/kteza1/rust-mosquitto"

cargo build is throwing

Could not find `Cargo.toml` in `/Users/ravitejareddy/.cargo/git/checkouts/rust-mosquitto-8203e77dcf072bf7/rust-mosquitto`

Actual download in .cargo is as below where Cargo.toml is present

/Users/ravitejareddy/.cargo/git/checkouts/rust-mosquitto-8203e77dcf072bf7/master

What’s happening here? There is an extra rust-mosquitto in the path above. What am I doing wrong ?


#2

I’m wondering if https://github.com/kteza1/rust-mosquitto/blob/master/Cargo.toml#L6 is causing issues…

EDIT: hmmm that doesnt seem to be it. I can reproduce, weird…


#3

Problem is with nested Cargo.toml as pointed out by @shepmaster in stackoverflow