clippy allow -> expect
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::{
|
||||
pub(super) fn command(mut item: ItemFn, _args: &[Meta]) -> Result<TokenStream> {
|
||||
let attr: Vec<Attribute> = parse_quote! {
|
||||
#[tuwunel_macros::implement(crate::Context, params = "<'_>")]
|
||||
#[allow(clippy::unused_async)]
|
||||
#[expect(clippy::unused_async)]
|
||||
};
|
||||
|
||||
item.attrs.extend(attr);
|
||||
@@ -34,13 +34,13 @@ pub(super) fn command_dispatch(item: ItemEnum, args: &[Meta]) -> Result<TokenStr
|
||||
.try_collect()?;
|
||||
|
||||
let switch = quote! {
|
||||
#[allow(clippy::large_stack_frames)] //TODO: fixme
|
||||
#[expect(clippy::large_stack_frames)] //TODO: fixme
|
||||
pub(super) async fn process(
|
||||
command: #name,
|
||||
context: &crate::Context<'_>
|
||||
) -> Result {
|
||||
use #name::*;
|
||||
#[allow(non_snake_case)]
|
||||
#[expect(non_snake_case)]
|
||||
match command {
|
||||
#( #arm )*
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ pub(super) fn manifest(item: ItemConst, args: &[Meta]) -> Result<TokenStream> {
|
||||
Ok(ret.into())
|
||||
}
|
||||
|
||||
#[allow(clippy::option_env_unwrap)]
|
||||
fn manifest_path(member: Option<&str>) -> Result<PathBuf> {
|
||||
let Some(path) = option_env!("CARGO_MANIFEST_DIR") else {
|
||||
return Err(Error::new(
|
||||
|
||||
@@ -17,7 +17,7 @@ const UNDOCUMENTED: &str = "# This item is undocumented. Please contribute docum
|
||||
|
||||
const HIDDEN: &[&str] = &["default", "display"];
|
||||
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
#[expect(clippy::needless_pass_by_value)]
|
||||
pub(super) fn example_generator(input: ItemStruct, args: &[Meta]) -> Result<TokenStream> {
|
||||
let write = is_cargo_build() && !is_cargo_test();
|
||||
let additional = generate_example(&input, args, write)?;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#![allow(clippy::disallowed_macros)]
|
||||
|
||||
mod admin;
|
||||
mod cargo;
|
||||
mod config;
|
||||
|
||||
Reference in New Issue
Block a user