Skip to content

Commit 57d3e6f

Browse files
committed
v0.3.6
- Bump dependencies. - Minor cleanup and better CI.
1 parent ef345a1 commit 57d3e6f

File tree

10 files changed

+189
-140
lines changed

10 files changed

+189
-140
lines changed

.github/workflows/rust_validation.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ env:
1919
CARGO_NET_RETRY: 10
2020
RUST_BACKTRACE: 1
2121
CARGO_TERM_COLOR: always
22-
RUSTFLAGS: --deny warnings
23-
RUSTDOCFLAGS: --deny warnings
2422
RUSTUP_MAX_RETRIES: 10
2523

2624
defaults:
@@ -34,23 +32,5 @@ jobs:
3432
steps:
3533
- uses: actions/checkout@v3
3634

37-
- name: Install latest nightly
38-
uses: actions-rs/toolchain@v1
39-
with:
40-
toolchain: nightly
41-
components: rustc, cargo, rustfmt, rust-std, clippy, rust-src, rust-analysis
42-
43-
- name: Check format
44-
run: cargo fmt --all --check
45-
- name: Clippy
46-
run: cargo clippy --workspace --all-features --all-targets
47-
- name: Build
48-
run: cargo build --verbose
49-
- name: Build --no-default-features
50-
run: cargo build --verbose --no-default-features
51-
- name: Build --all-features
52-
run: cargo build --verbose --all-features --all-targets
53-
- name: Run tests
54-
run: cargo test --verbose --lib --examples
55-
- name: Run tests --all-features
56-
run: cargo test --verbose --all-features --lib --examples
35+
- name: Run the ./tools/ci.sh script
36+
run: ./tools/ci.sh

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.3.6] - 2025-01-22
10+
11+
- Bump dependencies.
12+
- Minor cleanup and better CI.
13+
914
## [0.3.5] - 2024-12-23
1015

1116
- Bump dependencies.
@@ -64,7 +69,8 @@ Updated dependencies.
6469

6570
Initial release.
6671

67-
[Unreleased]: https://github.com/ink-feather-org/trait-cast-rs/compare/v0.3.5...HEAD
72+
[Unreleased]: https://github.com/ink-feather-org/trait-cast-rs/compare/v0.3.6...HEAD
73+
[0.3.6]: https://github.com/ink-feather-org/trait-cast-rs/compare/v0.3.5...v0.3.6
6874
[0.3.5]: https://github.com/ink-feather-org/trait-cast-rs/compare/v0.3.4...v0.3.5
6975
[0.3.4]: https://github.com/ink-feather-org/trait-cast-rs/compare/v0.3.3...v0.3.4
7076
[0.3.3]: https://github.com/ink-feather-org/trait-cast-rs/compare/v0.3.2...v0.3.3

Cargo.lock

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

Cargo.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = ["tests/remapped_dependency_test"]
3+
members = ["macros"]
44

55
[workspace.lints.clippy]
66
let_and_return = "allow"
@@ -53,7 +53,7 @@ unused_qualifications = "warn"
5353

5454
[package]
5555
name = "trait-cast"
56-
version = "0.3.5"
56+
version = "0.3.6"
5757
edition = "2024"
5858
license = "MIT OR Apache-2.0"
5959
description = "Get your own Any with support for casting to trait objects."
@@ -70,11 +70,19 @@ alloc = []
7070
min_specialization = []
7171

7272
[dependencies]
73-
trait-cast-macros = { path = "macros", version = "0.3.5" }
73+
trait-cast-macros = { path = "macros", version = "0.3.6" }
7474

7575
[lints]
7676
workspace = true
7777

7878
[package.metadata.docs.rs]
7979
rustdoc-args = ["-Zunstable-options", "--generate-link-to-definition"]
8080
all-features = true
81+
82+
[[example]]
83+
name = "manual"
84+
required-features = ["alloc"]
85+
86+
[[example]]
87+
name = "with_proc_macro"
88+
required-features = ["alloc"]

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ Note: No modifications on the *target* traits are necessary. Which allows you to
3737
## Example
3838

3939
```rust
40-
# #![cfg_attr(feature = "min_specialization", feature(min_specialization))]
41-
# #![feature(ptr_metadata)]
40+
#![cfg_attr(feature = "min_specialization", feature(min_specialization))]
41+
#![feature(ptr_metadata)]
42+
# #[cfg(feature = "alloc")]
43+
# mod feature_gated {
44+
# fn main() {
4245
use trait_cast::{
4346
make_trait_castable, TraitcastableAny, TraitcastableAnyInfra, TraitcastableAnyInfraExt,
4447
};
@@ -57,6 +60,8 @@ let source = Box::new(Source(5));
5760
let castable: Box<dyn TraitcastableAny> = source;
5861
let x: &dyn Print = castable.downcast_ref().unwrap();
5962
x.print();
63+
# }
64+
# }
6065
```
6166

6267
## EVEN MORE Examples 🔥

macros/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "trait-cast-macros"
3-
version = "0.3.5"
3+
version = "0.3.6"
44
edition = "2024"
55
license = "MIT OR Apache-2.0"
66
description = "Proc-macro implementation for the 'trait-cast' crate."
@@ -25,7 +25,7 @@ tracing = { version = "0.1", default-features = false }
2525
tracing-proc-macros-ink = "0.1"
2626
toml_edit = { version = "0.22", default-features = false, features = ["parse"] }
2727
thiserror = { version = "2.0", default-features = false }
28-
cargo-manifest-proc-macros = "0.2"
28+
cargo-manifest-proc-macros = "0.3.3"
2929

3030
[lints]
3131
workspace = true

src/test.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use crate::{TraitcastableAny, TraitcastableAnyInfra, make_trait_castable_decl};
2-
use alloc::boxed::Box;
1+
#![allow(dead_code)]
2+
use crate::make_trait_castable_decl;
33

44
const fn _test_empty_trait_cast_targets() {
55
struct Woof {}
@@ -23,8 +23,12 @@ impl Print for Source {
2323
}
2424
}
2525

26+
#[cfg(feature = "alloc")]
2627
#[test]
2728
fn test_trait_castable() {
29+
use crate::{TraitcastableAny, TraitcastableAnyInfra};
30+
use alloc::boxed::Box;
31+
2832
let source = Box::new(Source(5));
2933
let castable: Box<dyn TraitcastableAny> = source;
3034
let x: &dyn Print = castable.downcast_ref().unwrap();

tests/remapped_dependency_test/Cargo.toml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)