Skip to content

Commit

Permalink
Switch from tilde to caret dependencies, bump dependency versions and…
Browse files Browse the repository at this point in the history
… MSRV
  • Loading branch information
svartalf committed Apr 7, 2021
1 parent ad69138 commit 1fb0905
Show file tree
Hide file tree
Showing 24 changed files with 164 additions and 143 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- { os: 'ubuntu-latest', target: 'arm-unknown-linux-gnueabihf', cross: true }
- { os: 'ubuntu-latest', target: 'arm-unknown-linux-musleabihf', cross: true }
toolchain:
- 1.45.0 # MSRV
- 1.46.0 # MSRV
- stable

steps:
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ publish = false

[dependencies]
heim = { path = "../heim", features = ["full"] }
futures = "~0.3"
criterion = "~0.3"
smol = "~1.2"
futures = "^0.3"
criterion = "^0.3"
smol = "^1.2"

[[bench]]
name = "benchmark"
Expand Down
12 changes: 6 additions & 6 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ autoexamples = false
autobins = false

[dev-dependencies]
cfg-if = "~1.0"
cfg-if = "^1.0"
heim = { path = "../heim", features = ["full"] }
futures-timer = "~3.0"
futures-timer = "^3.0"

futures = "~0.3"
smol = "~1.2"
tokio = { version = "~0.3", features = ["full"] }
async-std = { version = "~1.7", features = ["attributes"] }
futures = "^0.3"
smol = "^1.2"
tokio = { version = "^0.3", features = ["full"] }
async-std = { version = "^1.7", features = ["attributes"] }

ptree = { version = "0.3", default-features = false, features = ["ansi"] }
prettytable-rs = "0.8.0"
Expand Down
14 changes: 7 additions & 7 deletions heim-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ readme = "README.md"
license = "Apache-2.0 OR MIT"

[dependencies]
libc = "~0.2"
cfg-if = "~1.0"
libc = "^0.2"
cfg-if = "^1.0"
futures-core = "^0.3"
futures-util = { version = "^0.3", default-features = false }
pin-utils = "0.1.0-alpha.4"
uom = { version = "0.30.0", default-features = false, features = ["autoconvert", "f32", "f64", "u64", "si", "std"] }
backtrace = { version = "~0.3", optional = true }
uom = { version = "0.31.1", default-features = false, features = ["autoconvert", "f32", "f64", "u64", "si", "std"] }
backtrace = { version = "^0.3", optional = true }

[target.'cfg(unix)'.dependencies]
nix = "~0.19"
nix = "^0.20"
lazy_static = "1.3.0"

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = ">=0.3.8", features = ["winnt", "minwindef", "libloaderapi", "handleapi"] }

[target.'cfg(target_os = "macos")'.dependencies]
mach = "0.3.2"
core-foundation = "~0.9"
core-foundation = "^0.9"

[dev-dependencies]
futures-executor = "^0.3"
version-sync = "0.9"
static_assertions = "~1.1"
static_assertions = "^1.1"

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
1 change: 1 addition & 0 deletions heim-common/src/sys/macos/iokit/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub type io_registry_entry_t = io_object_t;
pub type io_service_t = io_object_t;
pub type io_iterator_t = io_object_t;

#[allow(clippy::upper_case_acronyms)] // It is fine for bindings
pub type IOOptionBits = u32;

extern "C" {
Expand Down
18 changes: 9 additions & 9 deletions heim-cpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ license = "Apache-2.0 OR MIT"
[dependencies]
heim-common = { version = "0.1.0-rc.1", path = "../heim-common" }
heim-runtime = { version = "0.1.0-rc.1", path = "../heim-runtime" }
futures = { version = "~0.3", default-features = false, features = ["std"] }
futures = { version = "^0.3", default-features = false, features = ["std"] }
lazy_static = "1.3.0"
cfg-if = "~1.0"
cfg-if = "^1.0"

[target.'cfg(target_os = "linux")'.dependencies]
libc = "~0.2"
glob = "~0.3"
smol = "~1.2"
libc = "^0.2"
glob = "^0.3"
smol = "^1.2"

[target.'cfg(target_os = "windows")'.dependencies]
ntapi = "~0.3"
ntapi = "^0.3"

[target.'cfg(target_os = "windows")'.dependencies.winapi]
version = ">=0.3.8"
Expand All @@ -39,13 +39,13 @@ features = [
]

[target.'cfg(target_os = "macos")'.dependencies]
libc = "~ 0.2"
libc = "^ 0.2"
mach = "0.3.2"

[dev-dependencies]
heim-derive = { version = "0.1.0-rc.1", path = "../heim-derive" }
smol = "~1.2"
futures = "~0.3"
smol = "^1.2"
futures = "^0.3"
version-sync = "0.9"
futures-timer = "^3.0"

Expand Down
12 changes: 6 additions & 6 deletions heim-cpu/src/sys/linux/freq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ fn _frequencies() -> impl Iterator<Item = Result<CpuFrequency>> {
let path = try_path.map_err(|e| e.into_error())?;

let current = current_freq(&path)?;
let max = max_freq(&path)?;
let min = min_freq(&path)?;
let max = max_freq(&path);
let min = min_freq(&path);

Ok(CpuFrequency { current, max, min })
})
Expand Down Expand Up @@ -127,16 +127,16 @@ fn current_freq(path: &Path) -> Result<Frequency> {
// future::ready(result)
}

fn max_freq(path: &Path) -> Result<Option<Frequency>> {
fn max_freq(path: &Path) -> Option<Frequency> {
let value = read_freq(path.join("scaling_max_freq"));

// Don't care about errors propagation at this point
Ok(value.ok())
value.ok()
}

fn min_freq(path: &Path) -> Result<Option<Frequency>> {
fn min_freq(path: &Path) -> Option<Frequency> {
let value = read_freq(path.join("scaling_min_freq"));

// Don't care about errors propagation at this point
Ok(value.ok())
value.ok()
}
2 changes: 2 additions & 0 deletions heim-cpu/src/sys/windows/bindings/power.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::upper_case_acronyms)] // It is fine for bindings

use winapi::shared::minwindef;

#[repr(C)]
Expand Down
1 change: 1 addition & 0 deletions heim-cpu/src/sys/windows/bindings/winternl.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(clippy::upper_case_acronyms)] // It is fine for bindings

use std::io;
use std::mem;
Expand Down
6 changes: 3 additions & 3 deletions heim-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ license = "Apache-2.0 OR MIT"
proc-macro = true

[dependencies]
proc-macro2 = "~1.0"
quote = "~1.0"
syn = { version = "~1.0", default-features = false, features = ["derive", "full", "parsing", "printing", "proc-macro"] }
proc-macro2 = "^1.0"
quote = "^1.0"
syn = { version = "^1.0", default-features = false, features = ["derive", "full", "parsing", "printing", "proc-macro"] }

[dev-dependencies]
version-sync = "0.9"
10 changes: 5 additions & 5 deletions heim-disk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ license = "Apache-2.0 OR MIT"
[dependencies]
heim-common = { version = "0.1.0-rc.1", path = "../heim-common" }
heim-runtime = { version = "0.1.0-rc.1", path = "../heim-runtime" }
cfg-if = "~1.0"
cfg-if = "^1.0"
bitflags = "1.0.4"

[target.'cfg(unix)'.dependencies]
libc = "~0.2"
libc = "^0.2"

[target.'cfg(target_os = "windows")'.dependencies]
widestring = "0.4.0"
Expand All @@ -30,12 +30,12 @@ features = ["std", "winnt", "ntdef", "fileapi", "handleapi",

[target.'cfg(target_os = "macos")'.dependencies]
mach = "0.3.2"
core-foundation = "~0.9"
core-foundation = "^0.9"

[dev-dependencies]
heim-derive = { version = "0.1.0-rc.1", path = "../heim-derive" }
smol = "~1.2"
futures = "~0.3"
smol = "^1.2"
futures = "^0.3"
version-sync = "0.9"

[package.metadata.docs.rs]
Expand Down
3 changes: 2 additions & 1 deletion heim-disk/src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ pub enum FileSystem {

impl FileSystem {
/// Checks if filesystem is used for a physical devices
#[allow(clippy::unknown_clippy_lints, clippy::match_like_matches_macro)]
// TODO: Revisit clippy lint later, `match!` should be in MSRV now?
#[allow(clippy::match_like_matches_macro)]
pub fn is_physical(&self) -> bool {
match self {
FileSystem::Other(..) => false,
Expand Down
14 changes: 7 additions & 7 deletions heim-host/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ license = "Apache-2.0 OR MIT"
build = "build.rs"

[dependencies]
log = "~0.4"
log = "^0.4"
heim-common = { version = "0.1.0-rc.1", path = "../heim-common" }
heim-runtime = { version = "0.1.0-rc.1", path = "../heim-runtime" }
cfg-if = "~1.0"
platforms = "~1.0"
libc = "~0.2"
cfg-if = "^1.0"
platforms = "^1.1"
libc = "^0.2"

[dev-dependencies]
heim-derive = { version = "0.1.0-rc.1", path = "../heim-derive" }
futures = "~0.3"
smol = "~1.2"
futures = "^0.3"
smol = "^1.2"
version-sync = "0.9"

[target.'cfg(target_os = "macos")'.dependencies]
Expand All @@ -31,7 +31,7 @@ mach = "0.3.2"

[target.'cfg(target_os = "windows")'.dependencies]
winapi = { version = ">=0.3.8", features = ["sysinfoapi", "ws2def", "winbase", "minwindef", "winnt"] }
ntapi = "~0.3"
ntapi = "^0.3"

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
1 change: 1 addition & 0 deletions heim-host/src/sys/windows/bindings/wtsapi32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#![allow(clippy::upper_case_acronyms)] // It is fine for bindings

use winapi::shared::minwindef::{BOOL, BYTE, DWORD};
use winapi::um::winnt::{HANDLE, LARGE_INTEGER, LPWSTR, PSID, PVOID, WCHAR};
Expand Down
11 changes: 8 additions & 3 deletions heim-host/src/sys/windows/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ use std::fmt;
use std::mem;

use ntapi::ntrtl;
use winapi::shared::{minwindef, ntstatus};
use winapi::shared::ntdef::NULL;
use winapi::shared::{minwindef, ntstatus};
use winapi::um::sysinfoapi::{
ComputerNameDnsDomain, ComputerNameDnsHostname, COMPUTER_NAME_FORMAT,
};
use winapi::um::{sysinfoapi, winnt};
use winapi::um::sysinfoapi::{COMPUTER_NAME_FORMAT, ComputerNameDnsHostname, ComputerNameDnsDomain};

use heim_common::prelude::{Error, Result};

Expand Down Expand Up @@ -160,7 +162,10 @@ fn get_value_from_get_computer_name_ex_w(kind: COMPUTER_NAME_FORMAT) -> Result<S

if size > required_size {
// Should not happen, size "receives the number of TCHARs copied to the destination buffer, not including the terminating null character"
let e = std::io::Error::new(std::io::ErrorKind::Other, "Invalid value returned by GetComputerNameExW");
let e = std::io::Error::new(
std::io::ErrorKind::Other,
"Invalid value returned by GetComputerNameExW",
);
return Err(e.into());
}
// buffer[..size] is valid because buffer.len > size already
Expand Down
8 changes: 4 additions & 4 deletions heim-memory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ license = "Apache-2.0 OR MIT"
[dependencies]
heim-common = { version = "0.1.0-rc.1", path = "../heim-common" }
heim-runtime = { version = "0.1.0-rc.1", path = "../heim-runtime" }
cfg-if = "~1.0"
cfg-if = "^1.0"

[target.'cfg(target_os = "windows")'.dependencies]
libc = "~0.2"
libc = "^0.2"
winapi = { version = ">=0.3.8", default-features = false, features = ["minwindef", "sysinfoapi"] }

[target.'cfg(target_os = "macos")'.dependencies]
libc = "~0.2"
libc = "^0.2"
mach = "0.3.2"
lazy_static = "1.3.0"

[dev-dependencies]
heim-derive = { version = "0.1.0-rc.1", path = "../heim-derive" }
smol = "~1.2"
smol = "^1.2"
version-sync = "0.9"

[package.metadata.docs.rs]
Expand Down
10 changes: 5 additions & 5 deletions heim-net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ license = "Apache-2.0 OR MIT"
[dependencies]
heim-common = { version = "0.1.0-rc.1", path = "../heim-common" }
heim-runtime = { version = "0.1.0-rc.1", path = "../heim-runtime" }
cfg-if = "~1.0"
cfg-if = "^1.0"
bitflags = "^1.0"
macaddr = "1.0"
libc = "~0.2"
libc = "^0.2"

[target.'cfg(unix)'.dependencies]
nix = "~0.19"
nix = "^0.20"

[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3", features = ["iphlpapi"]}
widestring = "0.4"

[dev-dependencies]
heim-derive = { version = "0.1.0-rc.1", path = "../heim-derive" }
smol = "~1.2"
futures = "~0.3"
smol = "^1.2"
futures = "^0.3"
version-sync = "0.9"

[package.metadata.docs.rs]
Expand Down
Loading

0 comments on commit 1fb0905

Please sign in to comment.