File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ This crate provides a library for efficiently parsing [Desktop Entry](https://sp
5
5
``` rust
6
6
use std :: fs;
7
7
8
- use freedesktop_desktop_entry :: {default_paths, DesktopEntry , Iter };
8
+ use freedesktop_desktop_entry :: {default_paths, DesktopEntry , Iter , PathSource };
9
9
10
10
fn main () {
11
- for (path_src , path ) in Iter :: new (default_paths ()) {
11
+ for path in Iter :: new (default_paths ()) {
12
+ let path_src = PathSource :: guess_from (& path );
12
13
if let Ok (bytes ) = fs :: read_to_string (& path ) {
13
14
if let Ok (entry ) = DesktopEntry :: decode (& path , & bytes ) {
14
15
println! (" {:?}: {}\ n ---\ n {}" , path_src , path . display (), entry );
@@ -29,4 +30,4 @@ Any contribution intentionally submitted for inclusion in the work by you shall
29
30
``` rs
30
31
// Copyright {year} {person OR org} <{email}>
31
32
// SPDX-License-Identifier: MPL-2.0
32
- ```
33
+ ```
You can’t perform that action at this time.
0 commit comments