Failed to find Cargo.toml


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

My current Cargo.toml is as below

name = "HomeDaemon"
version = "0.1.0"
authors = ["RTR <>"]

git = ""

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


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


I’m wondering if is causing issues…

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


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