From dfa9421f297a2283564ad86ed178d44270ba8e8f Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Sun, 18 Apr 2021 21:15:07 +0200 Subject: [PATCH 1/7] doc: Use README.md as crate root API documentation --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 953160f..2768ab1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ -//! FFI opaque pointers. -//! -//! FFI to use Rust objects from C as opaque pointer. +#![feature(external_doc)] +#![doc(include = "../README.md")] #![allow(unsafe_code)] #![warn(missing_docs)] From 0eeb9ff55b7be42ca23691d4df1e45137ea95d2d Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Tue, 26 Jan 2021 23:00:30 +0100 Subject: [PATCH 2/7] doc: Add short comment about example in README.md is compiled and run --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 2768ab1..650044f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ #![feature(external_doc)] -#![doc(include = "../README.md")] +#![doc(include = "../README.md")] // This also allow to run examples in that file. #![allow(unsafe_code)] #![warn(missing_docs)] From d15abddd6369f44886176710876993a83857bc3e Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Sun, 18 Apr 2021 20:52:22 +0200 Subject: [PATCH 3/7] refactor: Use extended key value attributes feature instead of external doc See: - https://github.com/rust-lang/rust/pull/83366 - https://github.com/rust-lang/rust/issues/44732 - https://github.com/rust-lang/rust/pull/82539 --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 650044f..2ca1707 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ -#![feature(external_doc)] -#![doc(include = "../README.md")] // This also allow to run examples in that file. +#![feature(extended_key_value_attributes)] +#![doc = include_str!("../README.md")] // This also allow to run examples in that file. #![allow(unsafe_code)] #![warn(missing_docs)] From c1b9cb17cb6b3ac67b8bbb1b8cc5c4884860aeaa Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Sun, 18 Apr 2021 21:17:57 +0200 Subject: [PATCH 4/7] refactor: Changes done by cargo fmt --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 2ca1707..94df1fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,5 @@ #![feature(extended_key_value_attributes)] #![doc = include_str!("../README.md")] // This also allow to run examples in that file. - #![allow(unsafe_code)] #![warn(missing_docs)] #![warn(clippy::pedantic)] From 6cef251cedb4f9a247dcc24adc1cecbcc5d4fbb7 Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Mon, 19 Apr 2021 01:41:44 +0200 Subject: [PATCH 5/7] chore: Fix workflow to avoid run stable tests in nightly branches --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82cf562..76c376b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: rust: [ stable, beta ] runs-on: ${{ matrix.os }} timeout-minutes: 5 - if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && !endsWith(github.ref, '-nightly') + if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && (github.event_name != 'pull_request' || !endsWith(github.head_ref, '-nightly')) steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -49,7 +49,7 @@ jobs: lint: runs-on: ubuntu-latest timeout-minutes: 5 - if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && !endsWith(github.ref, '-nightly') && !contains(github.ref, 'refs/tags/v') + if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && (github.event_name != 'pull_request' || !endsWith(github.head_ref, '-nightly')) && !contains(github.ref, 'refs/tags/v') steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 From 74b2713a3f2bf96c4300692d60d8bcb867d62da6 Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Mon, 19 Apr 2021 01:47:57 +0200 Subject: [PATCH 6/7] chore: Fix workflow to avoid run stable tests in nightly branches --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 76c376b..062e621 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: rust: [ stable, beta ] runs-on: ${{ matrix.os }} timeout-minutes: 5 - if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && (github.event_name != 'pull_request' || !endsWith(github.head_ref, '-nightly')) + if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && !endsWith(github.ref, '-nightly') && !endsWith(github.head_ref, '-nightly') steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -49,7 +49,7 @@ jobs: lint: runs-on: ubuntu-latest timeout-minutes: 5 - if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && (github.event_name != 'pull_request' || !endsWith(github.head_ref, '-nightly')) && !contains(github.ref, 'refs/tags/v') + if: github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' && !endsWith(github.ref, '-nightly') && !endsWith(github.head_ref, '-nightly') && !contains(github.ref, 'refs/tags/v') steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 From 62c22d76ad2ab3cd0a0930100ee2e3a433491bfb Mon Sep 17 00:00:00 2001 From: Jesus Hernandez Date: Sat, 22 Apr 2023 22:34:48 +0200 Subject: [PATCH 7/7] chore: Nightly feature is not needed now --- src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 94df1fa..625c158 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![feature(extended_key_value_attributes)] #![doc = include_str!("../README.md")] // This also allow to run examples in that file. #![allow(unsafe_code)] #![warn(missing_docs)]