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
|
||||
T: Into<Option<&'a str>>,
|
||||
{
|
||||
let app_name = app_name
|
||||
.into()
|
||||
.map(std::ffi::CString::new)
|
||||
.transpose()?;
|
||||
let app_name = app_name.into().map(std::ffi::CString::new).transpose()?;
|
||||
|
||||
if unsafe {
|
||||
notify_init(
|
||||
|
||||
@@ -54,15 +54,9 @@ impl<'a> Notification {
|
||||
{
|
||||
let summary = std::ffi::CString::new(summary)?;
|
||||
|
||||
let body = body
|
||||
.into()
|
||||
.map(std::ffi::CString::new)
|
||||
.transpose()?;
|
||||
let body = body.into().map(std::ffi::CString::new).transpose()?;
|
||||
|
||||
let icon = icon
|
||||
.into()
|
||||
.map(std::ffi::CString::new)
|
||||
.transpose()?;
|
||||
let icon = icon.into().map(std::ffi::CString::new).transpose()?;
|
||||
|
||||
let inner = unsafe {
|
||||
notify_notification_new(
|
||||
@@ -293,15 +287,9 @@ impl<'a> Notification {
|
||||
{
|
||||
let summary = std::ffi::CString::new(summary)?;
|
||||
|
||||
let body = body
|
||||
.into()
|
||||
.map(std::ffi::CString::new)
|
||||
.transpose()?;
|
||||
let body = body.into().map(std::ffi::CString::new).transpose()?;
|
||||
|
||||
let icon = icon
|
||||
.into()
|
||||
.map(std::ffi::CString::new)
|
||||
.transpose()?;
|
||||
let icon = icon.into().map(std::ffi::CString::new).transpose()?;
|
||||
|
||||
unsafe {
|
||||
notify_notification_update(
|
||||
|
||||
Reference in New Issue
Block a user