Skip to content

Commit d72be9c

Browse files
Note the implicit conversions for parameters explicitly
1 parent 62da115 commit d72be9c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ fn main() {
2424
Use `.manifest_optional().unwrap()` if the manifest is cosmetic (like an icon).<br />
2525
Use `.manifest_required().unwrap()` if the manifest is required (security, entry point, &c.).
2626

27+
Parameters that look like `&["string"]` or `embed_resource::NONE` in the example above
28+
can be anything that satisfies `IntoIterator<AsRef<OsStr>>`:
29+
`&[&str]`, of course, but also `Option<PathBuf>`, `Vec<OsString>`, &c.
30+
2731
## Example: Embedding a Windows Manifest
2832
Courtesy of [@jpoles1](https://github.com/jpoles1).
2933

src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
//! Use `.manifest_optional().unwrap()` if the manifest is cosmetic (like an icon).<br />
6161
//! Use `.manifest_required().unwrap()` if the manifest is required (security, entry point, &c.).
6262
//!
63+
//! Parameters that look like `&["string"]` or `embed_resource::NONE` in the example above
64+
//! can be anything that satisfies `IntoIterator<AsRef<OsStr>>`:
65+
//! `&[&str]`, of course, but also `Option<PathBuf>`, `Vec<OsString>`, &c.
66+
//!
6367
//! ## Errata
6468
//!
6569
//! If no `cargo:rerun-if-changed` annotations are generated, Cargo scans the entire build root by default.
@@ -88,7 +92,7 @@
8892
//! ## Migration
8993
//! ### 2.x
9094
//!
91-
//! Add `embed_resource::NONE` as the last argument to `embed_resource::compile()` and `embed_resource::compile_for()`.
95+
//! Add `embed_resource::NONE` as the last argument to `embed_resource::compile()` and `embed_resource::compile_for()`.
9296
//!
9397
//! ### 3.x
9498
//!

0 commit comments

Comments
 (0)