summaryrefslogtreecommitdiff
path: root/src/devices/system_device.rs
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2024-12-16 13:45:22 +1300
committerBen Bridle <ben@derelict.engineering>2024-12-16 13:45:47 +1300
commit87f8faba2fde2ac4cfa79dbb1f30907b6e48653c (patch)
tree6dfcb01418af812383ffe45d15f2f4ca6c9adb92 /src/devices/system_device.rs
parent07fb107e2d0527545bcdbb47ace80551702a71b1 (diff)
downloadbedrock-pc-87f8faba2fde2ac4cfa79dbb1f30907b6e48653c.zip
Update metadata and parser to match current specification
The metadata specification has changed to use '/' as the separator between the program name and program version in the name string, and each author line is now no longer followed by the year in which the author last contributed to the program.
Diffstat (limited to 'src/devices/system_device.rs')
-rw-r--r--src/devices/system_device.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/devices/system_device.rs b/src/devices/system_device.rs
index bcffb86..383bb08 100644
--- a/src/devices/system_device.rs
+++ b/src/devices/system_device.rs
@@ -14,11 +14,8 @@ impl SystemDevice {
let pkg_version = env!("CARGO_PKG_VERSION");
let pkg_name = env!("CARGO_PKG_NAME");
let pkg_authors = env!("CARGO_PKG_AUTHORS");
- let name_str = format!("{pkg_name}, {pkg_version}");
- let mut authors_str = String::new();
- for author in pkg_authors.split(":") {
- authors_str.push_str(&format!("{author}, 2024\n"));
- }
+ let name_str = format!("{pkg_name}/{pkg_version}");
+ let authors_str = pkg_authors.replace(":", "\n");
Self {
name: ReadBuffer::from_str(&name_str),
authors: ReadBuffer::from_str(&authors_str),