diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5c227c..29740bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,10 @@ jobs: - run: cargo +nightly llvm-cov --workspace --branch --exclude-from-report pastey-test-suite --doctests --lcov --output-path lcov.info env: RUSTFLAGS: -C instrument-coverage -C llvm-args=-pgo-warn-missing-function + - name: Print coverage summary and thresould check + run: cargo +nightly llvm-cov --workspace --branch --exclude-from-report pastey-test-suite --doctests --fail-under-lines 100 --fail-under-regions 100 + env: + RUSTFLAGS: -C instrument-coverage -C llvm-args=-pgo-warn-missing-function - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: diff --git a/src/attr.rs b/src/attr.rs index 0db043f..3c0bccf 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -1,9 +1,9 @@ use crate::error::Result; use crate::segment::{self, Segment}; +use core::iter; +use core::mem; +use core::str::FromStr; use proc_macro::{Delimiter, Group, Spacing, Span, TokenStream, TokenTree}; -use std::iter; -use std::mem; -use std::str::FromStr; pub fn expand_attr( attr: TokenStream, diff --git a/src/error.rs b/src/error.rs index 7c5badb..e6b7c6c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,7 +1,7 @@ +use core::iter::FromIterator; use proc_macro::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree}; -use std::iter::FromIterator; -pub type Result = std::result::Result; +pub type Result = core::result::Result; pub struct Error { begin: Span, diff --git a/src/lib.rs b/src/lib.rs index 1e47210..03472d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,13 +20,13 @@ mod test_helpers; use crate::attr::expand_attr; use crate::error::{Error, Result}; use crate::segment::Segment; +use core::char; +use core::iter; +use core::str::FromStr; use proc_macro::{ Delimiter, Group, Ident, LexError, Literal, Punct, Spacing, Span, TokenStream, TokenTree, }; -use std::char; -use std::iter; use std::panic; -use std::str::FromStr; #[proc_macro] pub fn paste(input: TokenStream) -> TokenStream { diff --git a/src/segment.rs b/src/segment.rs index 764966c..93988ac 100644 --- a/src/segment.rs +++ b/src/segment.rs @@ -1,6 +1,6 @@ use crate::error::{Error, Result}; +use core::iter::Peekable; use proc_macro::{token_stream, Delimiter, Group, Ident, Literal, Span, TokenTree}; -use std::iter::Peekable; pub(crate) enum Segment { String(LitStr), diff --git a/src/test_helpers.rs b/src/test_helpers.rs index 405bf4d..e21b42d 100644 --- a/src/test_helpers.rs +++ b/src/test_helpers.rs @@ -5,8 +5,8 @@ // not production code. use crate::attr::expand_attr; +use core::str::FromStr; use proc_macro::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree}; -use std::str::FromStr; use super::{expand, parse_bracket_as_segments, pasted_to_tokens};