mirror of
https://github.com/szymon-jozef/libnotify-rs.git
synced 2026-10-27 19:20:43 +01:00
fix: formatting
This commit is contained in:
@@ -14,10 +14,7 @@ pub fn init<'a, T>(app_name: T) -> Result<(), Box<dyn std::error::Error>>
|
|||||||
where
|
where
|
||||||
T: Into<Option<&'a str>>,
|
T: Into<Option<&'a str>>,
|
||||||
{
|
{
|
||||||
let app_name = app_name
|
let app_name = app_name.into().map(std::ffi::CString::new).transpose()?;
|
||||||
.into()
|
|
||||||
.map(std::ffi::CString::new)
|
|
||||||
.transpose()?;
|
|
||||||
|
|
||||||
if unsafe {
|
if unsafe {
|
||||||
notify_init(
|
notify_init(
|
||||||
|
|||||||
@@ -54,15 +54,9 @@ impl<'a> Notification {
|
|||||||
{
|
{
|
||||||
let summary = std::ffi::CString::new(summary)?;
|
let summary = std::ffi::CString::new(summary)?;
|
||||||
|
|
||||||
let body = body
|
let body = body.into().map(std::ffi::CString::new).transpose()?;
|
||||||
.into()
|
|
||||||
.map(std::ffi::CString::new)
|
|
||||||
.transpose()?;
|
|
||||||
|
|
||||||
let icon = icon
|
let icon = icon.into().map(std::ffi::CString::new).transpose()?;
|
||||||
.into()
|
|
||||||
.map(std::ffi::CString::new)
|
|
||||||
.transpose()?;
|
|
||||||
|
|
||||||
let inner = unsafe {
|
let inner = unsafe {
|
||||||
notify_notification_new(
|
notify_notification_new(
|
||||||
@@ -293,15 +287,9 @@ impl<'a> Notification {
|
|||||||
{
|
{
|
||||||
let summary = std::ffi::CString::new(summary)?;
|
let summary = std::ffi::CString::new(summary)?;
|
||||||
|
|
||||||
let body = body
|
let body = body.into().map(std::ffi::CString::new).transpose()?;
|
||||||
.into()
|
|
||||||
.map(std::ffi::CString::new)
|
|
||||||
.transpose()?;
|
|
||||||
|
|
||||||
let icon = icon
|
let icon = icon.into().map(std::ffi::CString::new).transpose()?;
|
||||||
.into()
|
|
||||||
.map(std::ffi::CString::new)
|
|
||||||
.transpose()?;
|
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
notify_notification_update(
|
notify_notification_update(
|
||||||
|
|||||||
Reference in New Issue
Block a user