Skip to content

Commit

Permalink
bump MSRV to 1.63
Browse files Browse the repository at this point in the history
  • Loading branch information
nrxus committed Dec 2, 2024
1 parent 9452e27 commit ce4de54
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: test stable --release
run: cargo +stable test --release --verbose
# MSRV
- uses: dtolnay/rust-toolchain@1.58.1
- uses: dtolnay/rust-toolchain@1.63.0
- name: build MSRV
run: cargo +1.58.1 build --verbose
run: cargo +1.63.0 build --verbose
- name: test MSRV
run: cargo +1.58.1 test --verbose
run: cargo +1.63.0 test --verbose
- name: test MSRV --release
run: cargo +1.58.1 test --release --verbose
run: cargo +1.63.0 test --release --verbose
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## NEXT
* Add support for mocking methods with generic parameters
* [test](/tests/generic_method_return.rs)
* Bump MSRV as v1.63

## v0.1.10
* Fix issue where methods that returned a type with a name that
contains the name of the mocked struct would fail to compile.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repository = "https://github.com/nrxus/faux"
edition = "2021"
keywords = ["mock", "mocking", "test", "testing", "faux"]
readme = "README.md"
rust-version = "1.58"
rust-version = "1.63"

[dependencies]
faux_macros = { path = "faux_macros", version = "0.1.10" }
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# faux   [![Latest Version]][crates.io] [![rustc 1.58+]][Rust 1.58] [![docs]][api docs] ![][build]
# faux   [![Latest Version]][crates.io] [![rustc 1.63+]][Rust 1.63] [![docs]][api docs] ![][build]

A library to create [mocks] out of structs.

Expand Down Expand Up @@ -227,8 +227,8 @@ methods in structs.

[Latest Version]: https://img.shields.io/crates/v/faux.svg
[crates.io]: https://crates.io/crates/faux
[rustc 1.58+]: https://img.shields.io/badge/rustc-1.58+-blue.svg
[Rust 1.58]: https://blog.rust-lang.org/2022/01/13/Rust-1.58.0.html
[rustc 1.63+]: https://img.shields.io/badge/rustc-1.63+-blue.svg
[Rust 1.63]: https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html
[Latest Version]: https://img.shields.io/crates/v/faux.svg
[docs]: https://img.shields.io/badge/api-docs-blue.svg
[api docs]: https://docs.rs/faux/
Expand Down
6 changes: 3 additions & 3 deletions faux_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ description = "Implementations for #[create], #[methods], when!"
homepage = "https://github.com/nrxus/faux"
repository = "https://github.com/nrxus/faux"
keywords = ["mock", "mocking", "test", "testing", "faux"]
rust-version = "1.58"
rust-version = "1.63"

[dependencies]
syn = { version = "2", features = ["full", "extra-traits"] }
quote = "1.0.8"
proc-macro2 = "1.0.24"
quote = "1"
proc-macro2 = "1"
darling = "0.20"
uuid = { version = "1", features = ["v4"] }

Expand Down
9 changes: 2 additions & 7 deletions faux_macros/src/self_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ use proc_macro2::TokenStream;
use quote::quote;
use std::fmt::{self, Formatter};

#[derive(FromMeta, PartialEq, Eq, Copy, Clone)]
#[derive(FromMeta, PartialEq, Eq, Copy, Clone, Default)]
#[darling(rename_all = "PascalCase")]
pub enum SelfType {
Rc,
#[darling(rename = "owned")]
#[default]
Owned,
Arc,
Box,
Expand All @@ -30,12 +31,6 @@ impl SelfType {
}
}

impl Default for SelfType {
fn default() -> Self {
SelfType::Owned
}
}

impl fmt::Display for SelfType {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
(match self {
Expand Down

0 comments on commit ce4de54

Please sign in to comment.