I write dependencies of Cargo.toml :
[dependencies ]
opencv = {version = "0.26", default-features = false, features = ["opencv-41"]}
Above one line can pass compilation.
I want to seperate lines for dependencies.
This page https://github.com/BurntSushi/toml-test/blob/master/tests/valid/multiline-string.toml
said solution.
I refer this solution to write my dependencies:
[dependencies ]
opencv = """\{version = "0.26", \
default-features = false, \
features = ["opencv-41"] \
}"""
But compiler throw error:
$ cargo build [±master ●]
error: failed to parse manifest at /home/curlywei/WorkSpace/rust/testcargo/Cargo.toml
Caused by:
failed to parse the version requirement { version = "0.26", default-features = false, features = ["opencv-41"] } for dependency opencv
Caused by:
the given version requirement is invalid
How do I do?