File: 1001_sysinfo.patch

package info (click to toggle)
git-delta 0.18.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 5,256 kB
  • sloc: sh: 751; makefile: 117
file content (63 lines) | stat: -rw-r--r-- 1,819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Description: use newer branch of crate sysinfo
Author: Jonas Smedegaard <dr@jones.dk>
Last-Update: 2024-07-20
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -52,7 +52,7 @@
 smol_str = ">= 0.1.24, <= 0.2"
 syntect = "5.0.0"
 # sysinfo: no default features to disable the use of threads
-sysinfo = { version = "0.29.0", default-features = false, features = [] }
+sysinfo = { version = "0.30", default-features = false, features = [] }
 terminal-colorsaurus = "0.4.1"
 unicode-segmentation = "1.10.1"
 unicode-width = "=0.1.12"
--- a/src/utils/process.rs
+++ b/src/utils/process.rs
@@ -3,7 +3,7 @@
 use std::sync::{Arc, Condvar, Mutex, MutexGuard};
 
 use lazy_static::lazy_static;
-use sysinfo::{Pid, PidExt, Process, ProcessExt, ProcessRefreshKind, SystemExt};
+use sysinfo::{Pid, Process, ProcessRefreshKind, UpdateKind};
 
 pub type DeltaPid = u32;
 
@@ -307,21 +307,18 @@
     fn start_time(&self) -> u64;
 }
 
-impl<T> ProcActions for T
-where
-    T: ProcessExt,
-{
+impl ProcActions for Process {
     fn cmd(&self) -> &[String] {
-        ProcessExt::cmd(self)
+        Process::cmd(self)
     }
     fn parent(&self) -> Option<DeltaPid> {
-        ProcessExt::parent(self).map(|p| p.as_u32())
+        Process::parent(self).map(|p| p.as_u32())
     }
     fn pid(&self) -> DeltaPid {
-        ProcessExt::pid(self).as_u32()
+        Process::pid(self).as_u32()
     }
     fn start_time(&self) -> u64 {
-        ProcessExt::start_time(self)
+        Process::start_time(self)
     }
 }
 
@@ -438,7 +435,7 @@
     }
     fn refresh_processes(&mut self) {
         self.info
-            .refresh_processes_specifics(ProcessRefreshKind::new())
+            .refresh_processes_specifics(ProcessRefreshKind::new().with_cmd(UpdateKind::Always))
     }
 }