Skip to content

Commit 6d7244a

Browse files
committed
feat: bytesize v2
1 parent d423f8d commit 6d7244a

File tree

10 files changed

+28
-41
lines changed

10 files changed

+28
-41
lines changed

.cspell.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ words:
33
- bigdecimal
44
- bytesize
55
- chrono
6+
- clippy
67
- codecov
78
- confik
89
- dataless
@@ -15,11 +16,16 @@ words:
1516
- indoc
1617
- ipnetwork
1718
- msrv
19+
- nextest
20+
- nixpkgs
21+
- powerset
1822
- rustc
1923
- rustdoc
24+
- rustup
2025
- rustversion
2126
- serde
2227
- struct
28+
- taplo
2329
- tempfile
2430
- thiserror
2531
- trybuild

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: workaround MSRV issues
5151
if: matrix.toolchain.name == 'msrv'
52-
run: just downgrade-msrv
52+
run: just downgrade-for-msrv
5353

5454
- name: Test
5555
run: just test-no-coverage

Cargo.lock

Lines changed: 8 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ categories = ["config"]
99
repository = "https://github.com/x52dev/confik"
1010
license = "MIT OR Apache-2.0"
1111
edition = "2021"
12-
rust-version = "1.67"
12+
rust-version = "1.70"
1313

1414
[patch.crates-io]
1515
confik = { path = "confik" }

confik-macros/tests/trybuild/fail-default-parse.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ error[E0277]: the trait bound `usize: From<i32>` is not satisfied
55
| ^----
66
| |
77
| the trait `From<i32>` is not implemented for `usize`
8-
| this tail expression is of type `_`
8+
| this tail expression is of type `i32`
99
|
1010
= help: the following other types implement trait `From<T>`:
1111
<usize as From<NonZeroUsize>>
Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
error[E0412]: cannot find type `A` in this scope
22
--> tests/trybuild/fail-field-from-unknown-type.rs:6:21
33
|
4-
5 | struct Config {
5-
| - help: you might be missing a type parameter: `<A>`
64
6 | #[confik(from = A)]
75
| ^ not found in this scope
6+
|
7+
help: you might be missing a type parameter
8+
|
9+
5 | struct Config<A> {
10+
| +++
811

912
error[E0412]: cannot find type `A` in this scope
1013
--> tests/trybuild/fail-field-from-unknown-type.rs:6:21
1114
|
1215
6 | #[confik(from = A)]
1316
| ^ not found in this scope
14-
15-
error[E0283]: type annotations needed
16-
--> tests/trybuild/fail-field-from-unknown-type.rs:6:21
17-
|
18-
5 | struct Config {
19-
| ------ in this derive macro expansion
20-
6 | #[confik(from = A)]
21-
| _____________________^
22-
7 | | param: String,
23-
| |_________^ cannot infer type
24-
|
25-
= note: cannot satisfy `_: Default`
26-
= note: this error originates in the derive macro `::std::default::Default` (in Nightly builds, run with -Z macro-backtrace for more info)

confik/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Unreleased
44

5+
- Update `bytesize` dependency to `2`.
56
- Update `ipnetwork` dependency to `0.21`.
7+
- Minimum supported Rust version (MSRV) is now 1.70.
68

79
## 0.12.0
810

confik/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ serde_json = { version = "1", optional = true }
5252
toml = { version = "0.8", optional = true, default-features = false, features = ["parse"] }
5353

5454
bigdecimal = { version = "0.4", optional = true, features = ["serde"] }
55-
bytesize = { version = "1", optional = true, features = ["serde"] }
55+
bytesize = { version = "2.0.0-beta.1", optional = true, features = ["serde"] }
5656
camino = { version = "1", optional = true, features = ["serde1"] }
5757
chrono = { version = "0.4.39", optional = true, default-features = false, features = ["serde"] }
5858
ipnetwork = { version = "0.21", optional = true, features = ["serde"] }

confik/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ where
107107
// If there was no data then we're missing values
108108
.ok_or_else(|| Error::MissingValue(MissingValue::default()))??
109109
.try_build()
110-
.map_err(Into::into)
111110
}
112111

113112
/// The target to be deserialized from multiple sources.

justfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ msrv_rustup := "+" + msrv
1616

1717
# Downgrade dev-dependencies necessary to run MSRV checks/tests.
1818
[private]
19-
downgrade-msrv:
20-
cargo update -p=trybuild --precise=1.0.90
21-
cargo update -p=serde_with --precise=3.11.0
19+
downgrade-for-msrv:
20+
# no downgrades currently needed
2221

2322
# Test workspace using MSRV
24-
test-msrv: downgrade-msrv (test-no-coverage msrv_rustup)
23+
test-msrv: downgrade-for-msrv (test-no-coverage msrv_rustup)
2524

2625
# Test workspace without generating coverage files
2726
[private]

0 commit comments

Comments
 (0)