mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
migrate to doc_auto_cfg
This commit is contained in:
parent
111d95eaea
commit
f37c93a2a8
3
.github/workflows/ci-post-merge.yml
vendored
3
.github/workflows/ci-post-merge.yml
vendored
@ -3,8 +3,7 @@ name: CI (post-merge)
|
|||||||
on:
|
on:
|
||||||
push: { branches: [master] }
|
push: { branches: [master] }
|
||||||
|
|
||||||
permissions:
|
permissions: { contents: read }
|
||||||
contents: read # to fetch code (actions/checkout)
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -4,8 +4,7 @@ on:
|
|||||||
pull_request: {}
|
pull_request: {}
|
||||||
push: { branches: [master] }
|
push: { branches: [master] }
|
||||||
|
|
||||||
permissions:
|
permissions: { contents: read }
|
||||||
contents: read # to fetch code (actions/checkout)
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -45,7 +44,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.version }}
|
toolchain: ${{ matrix.version }}
|
||||||
|
|
||||||
- uses: taiki-e/cache-cargo-install-action@v1
|
- name: Install cargo-hack
|
||||||
|
uses: taiki-e/cache-cargo-install-action@v1
|
||||||
with: { tool: cargo-hack }
|
with: { tool: cargo-hack }
|
||||||
|
|
||||||
- name: workaround MSRV issues
|
- name: workaround MSRV issues
|
||||||
@ -97,10 +97,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.version }}
|
toolchain: ${{ matrix.version }}
|
||||||
|
|
||||||
- uses: taiki-e/cache-cargo-install-action@v1
|
- name: Install cargo-hack
|
||||||
with: { tool: cargo-hack }
|
uses: taiki-e/cache-cargo-install-action@v1
|
||||||
|
|
||||||
- uses: taiki-e/cache-cargo-install-action@v1
|
|
||||||
with: { tool: cargo-hack }
|
with: { tool: cargo-hack }
|
||||||
|
|
||||||
- name: workaround MSRV issues
|
- name: workaround MSRV issues
|
||||||
|
18
.github/workflows/coverage.yml
vendored
18
.github/workflows/coverage.yml
vendored
@ -1,12 +1,9 @@
|
|||||||
# disabled because `cargo tarpaulin` currently segfaults
|
|
||||||
|
|
||||||
name: Coverage
|
name: Coverage
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push: { branches: [master] }
|
push: { branches: [master] }
|
||||||
|
|
||||||
permissions:
|
permissions: { contents: read }
|
||||||
contents: read # to fetch code (actions/checkout)
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -26,20 +23,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install stable
|
- name: Install Rust (nightly)
|
||||||
run: |
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
rustup override set stable
|
with: { toolchain: nightly }
|
||||||
rustup update stable
|
|
||||||
|
|
||||||
- name: Generate Cargo.lock
|
|
||||||
run: cargo generate-lockfile
|
|
||||||
- name: Cache Dependencies
|
|
||||||
uses: Swatinem/rust-cache@v2.1.0
|
|
||||||
|
|
||||||
- name: Generate coverage file
|
- name: Generate coverage file
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-tarpaulin --vers "^0.13"
|
cargo install cargo-tarpaulin --vers "^0.13"
|
||||||
cargo tarpaulin --workspace --out Xml --verbose
|
cargo tarpaulin --workspace --out Xml --verbose
|
||||||
|
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with: { file: cobertura.xml }
|
with: { file: cobertura.xml }
|
||||||
|
13
.github/workflows/lint.yml
vendored
13
.github/workflows/lint.yml
vendored
@ -2,8 +2,7 @@ name: Lint
|
|||||||
|
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
permissions:
|
permissions: { contents: read }
|
||||||
contents: read # to fetch code (actions/checkout)
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -47,14 +46,18 @@ jobs:
|
|||||||
- name: checkout ${{ github.head_ref }}
|
- name: checkout ${{ github.head_ref }}
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
- name: Install Rust (nightly)
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with: { toolchain: nightly }
|
with: { toolchain: nightly }
|
||||||
|
|
||||||
- uses: taiki-e/cache-cargo-install-action@v1
|
- name: Install cargo-public-api
|
||||||
|
uses: taiki-e/cache-cargo-install-action@v1
|
||||||
with: { tool: cargo-public-api }
|
with: { tool: cargo-public-api }
|
||||||
|
|
||||||
- name: generate API diff
|
- name: generate API diff
|
||||||
run: |
|
run: |
|
||||||
for f in $(find -mindepth 2 -maxdepth 2 -name Cargo.toml); do
|
for f in $(find -mindepth 2 -maxdepth 2 -name Cargo.toml); do
|
||||||
cargo public-api --manifest-path "$f" --all-features diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }}
|
|
||||||
|
cargo public-api --manifest-path "$f" --all-features diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }} >> /tmp/diff.txt
|
||||||
done
|
done
|
||||||
|
cat /tmp/diff.txt
|
||||||
|
10
.github/workflows/upload-doc.yml
vendored
10
.github/workflows/upload-doc.yml
vendored
@ -3,8 +3,7 @@ name: Upload Documentation
|
|||||||
on:
|
on:
|
||||||
push: { branches: [master] }
|
push: { branches: [master] }
|
||||||
|
|
||||||
permissions:
|
permissions: { contents: write }
|
||||||
contents: read # to fetch code (actions/checkout)
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@ -17,10 +16,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust (nightly)
|
||||||
run: |
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
rustup override set nightly
|
with: { toolchain: nightly }
|
||||||
rustup update nightly
|
|
||||||
|
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
run: cargo doc --workspace --all-features --no-deps
|
run: cargo doc --workspace --all-features --no-deps
|
||||||
|
@ -431,7 +431,6 @@ impl Cors {
|
|||||||
///
|
///
|
||||||
/// [Private Network Access]: https://wicg.github.io/local-network-access
|
/// [Private Network Access]: https://wicg.github.io/local-network-access
|
||||||
#[cfg(feature = "draft-local-network-access")]
|
#[cfg(feature = "draft-local-network-access")]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "draft-local-network-access")))]
|
|
||||||
pub fn allow_local_network_access(mut self) -> Cors {
|
pub fn allow_local_network_access(mut self) -> Cors {
|
||||||
if let Some(cors) = cors(&mut self.inner, &self.error) {
|
if let Some(cors) = cors(&mut self.inner, &self.error) {
|
||||||
cors.allow_local_network_access = true;
|
cors.allow_local_network_access = true;
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#![warn(future_incompatible, missing_docs, missing_debug_implementations)]
|
#![warn(future_incompatible, missing_docs, missing_debug_implementations)]
|
||||||
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
||||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
mod all_or_some;
|
mod all_or_some;
|
||||||
mod builder;
|
mod builder;
|
||||||
|
@ -138,7 +138,7 @@
|
|||||||
#![warn(future_incompatible, missing_docs)]
|
#![warn(future_incompatible, missing_docs)]
|
||||||
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
||||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||||
#![cfg_attr(docsrs, feature(doc_cfg))]
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
|
||||||
pub mod config;
|
pub mod config;
|
||||||
mod middleware;
|
mod middleware;
|
||||||
|
@ -47,7 +47,6 @@ use crate::storage::{
|
|||||||
/// storage backend.
|
/// storage backend.
|
||||||
///
|
///
|
||||||
/// [`CookieContentSecurity::Private`]: crate::config::CookieContentSecurity::Private
|
/// [`CookieContentSecurity::Private`]: crate::config::CookieContentSecurity::Private
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "cookie-session")))]
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub struct CookieSessionStore;
|
pub struct CookieSessionStore;
|
||||||
|
@ -53,7 +53,6 @@ use crate::storage::{
|
|||||||
/// Redis. Use [`RedisSessionStore`] if you need TLS support.
|
/// Redis. Use [`RedisSessionStore`] if you need TLS support.
|
||||||
///
|
///
|
||||||
/// [`RedisSessionStore`]: crate::storage::RedisSessionStore
|
/// [`RedisSessionStore`]: crate::storage::RedisSessionStore
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "redis-actor-session")))]
|
|
||||||
pub struct RedisActorSessionStore {
|
pub struct RedisActorSessionStore {
|
||||||
configuration: CacheConfiguration,
|
configuration: CacheConfiguration,
|
||||||
addr: Addr<RedisActor>,
|
addr: Addr<RedisActor>,
|
||||||
@ -93,7 +92,6 @@ impl Default for CacheConfiguration {
|
|||||||
|
|
||||||
/// A fluent builder to construct a [`RedisActorSessionStore`] instance with custom configuration
|
/// A fluent builder to construct a [`RedisActorSessionStore`] instance with custom configuration
|
||||||
/// parameters.
|
/// parameters.
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "redis-actor-session")))]
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub struct RedisActorSessionStoreBuilder {
|
pub struct RedisActorSessionStoreBuilder {
|
||||||
connection_string: String,
|
connection_string: String,
|
||||||
|
@ -60,7 +60,6 @@ use crate::storage::{
|
|||||||
/// `RedisSessionStore` leverages [`redis-rs`] as Redis client.
|
/// `RedisSessionStore` leverages [`redis-rs`] as Redis client.
|
||||||
///
|
///
|
||||||
/// [`redis-rs`]: https://github.com/mitsuhiko/redis-rs
|
/// [`redis-rs`]: https://github.com/mitsuhiko/redis-rs
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "redis-rs-session")))]
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct RedisSessionStore {
|
pub struct RedisSessionStore {
|
||||||
configuration: CacheConfiguration,
|
configuration: CacheConfiguration,
|
||||||
@ -105,7 +104,6 @@ impl RedisSessionStore {
|
|||||||
/// parameters.
|
/// parameters.
|
||||||
///
|
///
|
||||||
/// [`RedisSessionStore`]: crate::storage::RedisSessionStore
|
/// [`RedisSessionStore`]: crate::storage::RedisSessionStore
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "redis-rs-session")))]
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub struct RedisSessionStoreBuilder {
|
pub struct RedisSessionStoreBuilder {
|
||||||
connection_string: String,
|
connection_string: String,
|
||||||
|
Loading…
Reference in New Issue
Block a user