mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
feat: change init function to return an error
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use libnotify_rs::functions::{self, uninit};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
functions::init("Morbius");
|
||||
functions::init("Morbius")?;
|
||||
|
||||
if let Some(caps) = functions::get_server_caps() {
|
||||
println!("=== Server caps ===");
|
||||
|
||||
@@ -4,7 +4,7 @@ use libnotify_rs::{
|
||||
};
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
init("I love coffee");
|
||||
init("I love coffee")?;
|
||||
let mut notify = Notification::new(
|
||||
"Remember to drink coffe!",
|
||||
"Coffee is very important for your mental health!",
|
||||
|
||||
Reference in New Issue
Block a user