Skip to content

Commit eadbd35

Browse files
committed
change file and clippy
1 parent 6ddaba6 commit eadbd35

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

.changes/changefile.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri-winrt-notification": patch
3+
---
4+
5+
Add `Toast::on_dismissed` handler.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"githubPullRequests.upstreamRemote": "never"
3+
}

README.md

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
# winrt-notification
22

3-
[![license](https://img.shields.io/crates/l/winrt-notification.svg)](https://crates.io/crates/winrt-notification/)
4-
[![version](https://img.shields.io/crates/v/winrt-notification.svg)](https://crates.io/crates/winrt-notification/)
5-
[![Build Status](https://img.shields.io/appveyor/ci/allenbenz/winrt-notification.svg)](https://ci.appveyor.com/project/allenbenz/winrt-notification)
3+
[![license](https://img.shields.io/crates/l/tauri-winrt-notification.svg)](https://crates.io/crates/tauri-winrt-notification/)
4+
[![documentation](https://img.shields.io/crates/v/tauri-winrt-notification?style=flat-square)](https://docs.rs/tauri-winrt-notification)
5+
66

77
An incomplete wrapper over the WinRT toast api
88

99
Tested in Windows 10 and 8.1. Untested in Windows 8, might work.
1010

11-
[0.5 Documentation](https://allenbenz.github.io/winrt-notification/0_5_0/winrt_notification/index.html)
12-
13-
[0.2 Documentation](https://allenbenz.github.io/winrt-notification/0_2_0/winrt_notification/index.html)
14-
1511
Todo:
1612
* Add support for Adaptive Content
17-
* Add support for Actions
1813

1914
Known Issues:
2015
* Will not work for Windows 7.
@@ -27,14 +22,14 @@ Limitations:
2722
```toml
2823
#Cargo.toml
2924
[dependencies]
30-
winrt-notification = "0.5.1"
25+
tauri-winrt-notification = "0.5.1"
3126
```
3227

3328
## Examples
3429

3530
```rust
3631
extern crate winrt_notification;
37-
use winrt_notification::{Duration, Sound, Toast};
32+
use tauri_winrt_notification::{Duration, Sound, Toast};
3833

3934
fn main() {
4035
Toast::new(Toast::POWERSHELL_APP_ID)
@@ -50,7 +45,7 @@ fn main() {
5045
```rust
5146
extern crate winrt_notification;
5247
use std::path::Path;
53-
use winrt_notification::{IconCrop, Toast};
48+
use tauri_winrt_notification::{IconCrop, Toast};
5449

5550
fn main() {
5651
Toast::new("Your AppUserModeId")

src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
//! Todo:
1111
//!
1212
//! * Add support for Adaptive Content
13-
//! * Improve support for Actions
1413
//!
1514
//! Known Issues:
1615
//!
@@ -334,7 +333,7 @@ impl Toast {
334333
Duration::Long => "duration=\"long\"",
335334
Duration::Short => "duration=\"short\"",
336335
}
337-
.to_owned();
336+
.to_string();
338337
self
339338
}
340339

@@ -349,7 +348,7 @@ impl Toast {
349348
Scenario::Reminder => "scenario=\"reminder\"",
350349
Scenario::IncomingCall => "scenario=\"incomingCall\"",
351350
}
352-
.to_owned();
351+
.to_string();
353352
self
354353
}
355354

@@ -403,7 +402,7 @@ impl Toast {
403402
pub fn image(mut self, source: &Path, alt_text: &str) -> Toast {
404403
if !is_newer_than_windows81() {
405404
// win81 cannot have more than 1 image and shows nothing if there is more than that
406-
self.images = "".to_owned();
405+
self.images = String::new();
407406
}
408407
self.images = format!(
409408
r#"{}<image id="1" src="file:///{}" alt="{}" />"#,

0 commit comments

Comments
 (0)