From a5a5a39160e81eca03d66dd410980543681cba6e Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Sat, 16 Dec 2023 00:06:51 +0100 Subject: [PATCH] Update lib.rs --- crates/resource-resolver/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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("") }