minor fixes

This commit is contained in:
Candifloss 2024-09-27 23:56:53 +05:30
parent 45bf3a87b9
commit 1e51c83067
5 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "snot"
version = "0.1.1"
version = "0.1.3"
edition = "2021"
authors = ["candifloss <candifloss.cc>"]

View File

@ -1,10 +1,11 @@
// This module deals with converting the notification object into rson format, which can be used instead of json if preferred
use crate::notification::Notification;
use rson_rs::ser::to_string as rson_string;
use rson_rs::de::Error as RsonError;
use rson_rs::ser::to_string as rson_string;
impl Notification {
pub fn rson(&self) -> Result<String, RsonError> {
rson_string(self).map_err(|e| RsonError::Message(format!("RSON serialization error: {}", e)))
rson_string(self)
.map_err(|e| RsonError::Message(format!("RSON serialization error: {}", e)))
}
}

View File

@ -14,7 +14,7 @@ use zbus::{message::Body, Connection, Result};
const SERVER_NAME: &str = "SNot"; // Server software name
const VENDOR: &str = "candifloss.cc"; // Server software vendor
const VERSION: &str = "0.1.2"; // Server software version
const VERSION: &str = env!("CARGO_PKG_VERSION"); // Server software version, from Cargo.toml
const SPEC_VERSION: &str = "0.42"; // DBus specification version
const NOTIF_INTERFACE: &str = "org.freedesktop.Notifications"; // DBus interface name