diff --git a/Cargo.lock b/Cargo.lock index ffb71e3..c3ca36c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "rsmodules" -version = "0.5.8" +version = "0.5.9" dependencies = [ "bincode 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 3edec35..3c1fef2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rsmodules" -version = "0.5.9" +version = "0.5.8" authors = ["Frederik Delaere "] [dependencies] diff --git a/src/script.rs b/src/script.rs index 491689c..c860683 100644 --- a/src/script.rs +++ b/src/script.rs @@ -501,7 +501,10 @@ pub fn get_description() -> Vec { // there can be multiple description calls, but // only store the first line of the description in // the cache file - output.push(INFO_GENERAL.lock().unwrap().get(0).unwrap().to_string()); + let desc: Vec = INFO_GENERAL.lock().unwrap().to_vec(); + if !desc.is_empty() { + output.push(INFO_GENERAL.lock().unwrap().get(0).unwrap().to_string()); + } output }