plugin: simpler crate version retrieval

This commit is contained in:
ppom 2026-02-09 12:00:00 +01:00
commit 34e2a8f294
No known key found for this signature in database

View file

@ -187,10 +187,9 @@ pub struct Hello {
impl Hello {
pub fn new() -> Hello {
let mut version = env!("CARGO_PKG_VERSION").split(".");
Hello {
version_major: version.next().unwrap().parse().unwrap(),
version_minor: version.next().unwrap().parse().unwrap(),
version_major: env!("CARGO_PKG_VERSION_MAJOR").parse().unwrap(),
version_minor: env!("CARGO_PKG_VERSION_MINOR").parse().unwrap(),
}
}