History

Adapt `gitoxide-core` to changes in `sysinfo`

Bumping the `sysinfo` dependency of `gitoxide-core` from 0.31.2 to 0.34.2 broke `RefreshKind::new()` and `CpuRefreshKind::new()` calls because `sysinfo` 0.33.0 renamed those `new()` to `nothing()`: https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md#0330 This renames the calls accordingly.

Eliah Kagan committed 1 year ago

Commit 417917f1 parent 8e5e68f1 file · +4 −3Browse files

Unified · Split

gitoxide-core/src/corpus/db.rs+4−3
@@ -118,7 +118,7 @@ pub fn create(path: impl AsRef<std::path::Path>) -> anyhow::Result<rusqlite::Con · 117 unmodified lines
118118 CREATE TABLE if not exists task(
119119 id integer PRIMARY KEY,
120120 short_name UNIQUE, -- the unique and permanent identifier for the task
121− description text UNIQUE -- the descriptive name of the task, it can be changed at will
121+ description text UNIQUE -- the descriptive name of the task, it can be changed at will
122122 )
123123 "#,
124124 )?;
@@ -148,8 +148,9 @@ pub fn create(path: impl AsRef<std::path::Path>) -> anyhow::Result<rusqlite::Con · 23 unmodified lines
148148 /// Utilities
149149 impl Engine {
150150 pub(crate) fn runner_id_or_insert(&self) -> anyhow::Result<Id> {
151− let sys =
152− sysinfo::System::new_with_specifics(RefreshKind::new().with_cpu(CpuRefreshKind::new().with_frequency()));
151+ let sys = sysinfo::System::new_with_specifics(
152+ RefreshKind::nothing().with_cpu(CpuRefreshKind::nothing().with_frequency()),
153+ );
153154 let cpu = &sys.cpus()[0];
154155 let vendor = Some(cpu.vendor_id().to_owned());
155156 let host = sysinfo::System::host_name();