diff --git a/crates/resource-resolver/src/lib.rs b/crates/resource-resolver/src/lib.rs index 10a72149..7a991c99 100644 --- a/crates/resource-resolver/src/lib.rs +++ b/crates/resource-resolver/src/lib.rs @@ -169,18 +169,18 @@ pub fn resource_dir_with_suffix(suffix: &str) -> Result { /// Warning: Having resource folders inside folders can create inconsistency. /// /// Example: You want to include the folder `crate/resource/icons/`. -/// +/// /// - With `cargo run` command, you will have to execute /// `resource_dir().unwrap().join("resource/icons/")` to get the path. /// - With any other formats, it will be `resource_dir().unwrap().join("icons/")`. -/// +/// /// For this use case, you can use [`self::resource_dir_with_suffix`] /// ``` /// use cargo_packager_resource_resolver::resource_dir_with_suffix; -/// +/// /// resource_dir_with_suffix("resource").unwrap().join("icons/"); /// ``` -/// +/// pub fn resource_dir() -> Result { resource_dir_with_suffix("") }