Resolve cosmic-files warnings without masking
Parse text/uri-list according to the real clipboard format, make unsupported trash search explicit, and update the lockfile so the local cosmic-text patch is actually used instead of reported as unused.
This commit is contained in:
parent
338354c4d0
commit
d080bc85af
4 changed files with 17 additions and 12 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -1494,8 +1494,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cosmic-text"
|
name = "cosmic-text"
|
||||||
version = "0.18.2"
|
version = "0.19.0"
|
||||||
source = "git+https://github.com/pop-os/cosmic-text.git#4d74f795cc771fdcc7ea0f9cacba63fcf036fad6"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.11.1",
|
"bitflags 2.11.1",
|
||||||
"fontdb",
|
"fontdb",
|
||||||
|
|
@ -1513,6 +1512,7 @@ dependencies = [
|
||||||
"unicode-linebreak",
|
"unicode-linebreak",
|
||||||
"unicode-script",
|
"unicode-script",
|
||||||
"unicode-segmentation",
|
"unicode-segmentation",
|
||||||
|
"unicode-width",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -9448,7 +9448,3 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
"winnow 0.7.15",
|
"winnow 0.7.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[patch.unused]]
|
|
||||||
name = "cosmic-text"
|
|
||||||
version = "0.19.0"
|
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ window_clipboard = { path = "/home/lionel/Devels/window_clipboard" }
|
||||||
dnd = { path = "/home/lionel/Devels/window_clipboard/dnd" }
|
dnd = { path = "/home/lionel/Devels/window_clipboard/dnd" }
|
||||||
mime = { path = "/home/lionel/Devels/window_clipboard/mime" }
|
mime = { path = "/home/lionel/Devels/window_clipboard/mime" }
|
||||||
|
|
||||||
[patch.'https://github.com/pop-os/cosmic-text']
|
[patch.'https://github.com/pop-os/cosmic-text.git']
|
||||||
cosmic-text = { path = "/home/lionel/Devels/cosmic-text" }
|
cosmic-text = { path = "/home/lionel/Devels/cosmic-text" }
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
|
||||||
|
|
@ -132,9 +132,10 @@ impl TryFrom<(Vec<u8>, String)> for ClipboardPaste {
|
||||||
match mime.as_str() {
|
match mime.as_str() {
|
||||||
"text/uri-list" => {
|
"text/uri-list" => {
|
||||||
let text = str::from_utf8(&data)?;
|
let text = str::from_utf8(&data)?;
|
||||||
let lines = text.lines();
|
for line in text.lines().filter(|line| {
|
||||||
|
let line = line.trim();
|
||||||
for line in text.lines() {
|
!line.is_empty() && !line.starts_with('#')
|
||||||
|
}) {
|
||||||
let url = Url::parse(line)?;
|
let url = Url::parse(line)?;
|
||||||
match url.to_file_path() {
|
match url.to_file_path() {
|
||||||
Ok(path) => paths.push(path),
|
Ok(path) => paths.push(path),
|
||||||
|
|
|
||||||
12
src/trash.rs
12
src/trash.rs
|
|
@ -27,7 +27,7 @@ pub trait TrashExt {
|
||||||
Vec::new()
|
Vec::new()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn scan_search<F: Fn(SearchItem) -> bool + Sync>(callback: F, regex: &Regex) {}
|
fn scan_search<F: Fn(SearchItem) -> bool + Sync>(callback: F, regex: &Regex);
|
||||||
|
|
||||||
fn icon(icon_size: u16) -> widget::icon::Handle {
|
fn icon(icon_size: u16) -> widget::icon::Handle {
|
||||||
widget::icon::from_name(if Self::is_empty() {
|
widget::icon::from_name(if Self::is_empty() {
|
||||||
|
|
@ -142,4 +142,12 @@ impl TrashExt for Trash {
|
||||||
not(target_os = "android")
|
not(target_os = "android")
|
||||||
)
|
)
|
||||||
)))]
|
)))]
|
||||||
impl TrashExt for Trash {}
|
impl TrashExt for Trash {
|
||||||
|
fn scan_search<F: Fn(SearchItem) -> bool + Sync>(callback: F, regex: &Regex) {
|
||||||
|
log::warn!(
|
||||||
|
"searching trash not supported on this platform for pattern {:?}",
|
||||||
|
regex.as_str()
|
||||||
|
);
|
||||||
|
drop(callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue