mirror of
https://framagit.org/ppom/reaction
synced 2026-03-14 20:55:47 +01:00
plugin: simpler crate version retrieval
This commit is contained in:
parent
41bc3525f8
commit
34e2a8f294
1 changed files with 2 additions and 3 deletions
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue