mirror of
https://github.com/bytedream/serde-inline-default.git
synced 2026-11-04 15:12:09 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0cc4052eaf | ||
|
|
d197326c32 | ||
|
|
71cdef9d6e | ||
|
|
6132d5369f | ||
|
|
2865e49da3 | ||
|
|
a44606e99c | ||
|
|
5cafcf3e3f |
No files matched your search
@@ -1,6 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: cargo
|
|
||||||
directory: /
|
|
||||||
schedule:
|
|
||||||
interval: weekly
|
|
||||||
+27
-14
@@ -2,30 +2,43 @@ name: ci
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
tags-ignore:
|
||||||
|
- "**"
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Generate cargo lockfile
|
- name: Setup Rust
|
||||||
run: cargo generate-lockfile
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Cargo cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
with:
|
||||||
path: |
|
toolchain: stable
|
||||||
~/.cargo/bin/
|
|
||||||
~/.cargo/registry/index/
|
|
||||||
~/.cargo/registry/cache/
|
|
||||||
~/.cargo/git/db/
|
|
||||||
target/
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test
|
run: cargo test
|
||||||
|
|
||||||
|
verify-msrv:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
|
- name: Install cargo-msrv
|
||||||
|
uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: cargo-msrv
|
||||||
|
|
||||||
|
- name: Verify msrv
|
||||||
|
run: cargo msrv verify --all-features
|
||||||
@@ -8,10 +8,16 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
|
||||||
- name: Publish crate
|
- name: Publish crate
|
||||||
run: cargo publish --token ${{ secrets.CRATES_TOKEN }}
|
env:
|
||||||
|
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
|
||||||
|
run: cargo publish
|
||||||
+11
-2
@@ -1,14 +1,23 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serde-inline-default"
|
name = "serde-inline-default"
|
||||||
version = "1.0.1"
|
version = "1.0.2"
|
||||||
authors = ["bytedream"]
|
authors = ["bytedream"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
rust-version = "1.71.0"
|
||||||
description = "Serde default values via inline declaration"
|
description = "Serde default values via inline declaration"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/bytedream/serde-inline-default"
|
repository = "https://github.com/bytedream/serde-inline-default"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
keywords = ["serde", "serialization"]
|
keywords = ["serde", "serialization"]
|
||||||
categories = ["encoding"]
|
categories = ["encoding"]
|
||||||
|
include = [
|
||||||
|
"/Cargo.toml",
|
||||||
|
"/LICENSE-APACHE",
|
||||||
|
"/LICENSE-MIT",
|
||||||
|
"/README.md",
|
||||||
|
"/src/**",
|
||||||
|
"/tests/**"
|
||||||
|
]
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
proc-macro = true
|
proc-macro = true
|
||||||
@@ -17,7 +26,7 @@ doctest = false
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
quote = "1.0"
|
quote = "1.0"
|
||||||
syn = { version = "2.0", features = ["full"] }
|
syn = { version = "3.0", features = ["full"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ pub(crate) fn type_lifetimes_to_static(ty: &mut Type) {
|
|||||||
}
|
}
|
||||||
PathArguments::Parenthesized(parenthesized) => {
|
PathArguments::Parenthesized(parenthesized) => {
|
||||||
for input in &mut parenthesized.inputs {
|
for input in &mut parenthesized.inputs {
|
||||||
type_lifetimes_to_static(input)
|
type_lifetimes_to_static(&mut input.ty)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user