mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Disable clippy for specific lines (#503)
This commit is contained in:
parent
cfc671d824
commit
1a36ce7fa8
@ -17,6 +17,7 @@ use crate::syntax::{SourceId, Span, SyntaxNode};
|
|||||||
use crate::World;
|
use crate::World;
|
||||||
|
|
||||||
/// An evaluatable function.
|
/// An evaluatable function.
|
||||||
|
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||||
#[derive(Clone, Hash)]
|
#[derive(Clone, Hash)]
|
||||||
pub struct Func {
|
pub struct Func {
|
||||||
/// The internal representation.
|
/// The internal representation.
|
||||||
@ -281,6 +282,7 @@ pub(super) struct Closure {
|
|||||||
|
|
||||||
impl Closure {
|
impl Closure {
|
||||||
/// Call the function in the context with the arguments.
|
/// Call the function in the context with the arguments.
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
#[comemo::memoize]
|
#[comemo::memoize]
|
||||||
fn call(
|
fn call(
|
||||||
this: &Func,
|
this: &Func,
|
||||||
|
@ -65,6 +65,7 @@ pub struct LangItems {
|
|||||||
/// A reference: `@target`, `@target[..]`.
|
/// A reference: `@target`, `@target[..]`.
|
||||||
pub reference: fn(target: Label, supplement: Option<Content>) -> Content,
|
pub reference: fn(target: Label, supplement: Option<Content>) -> Content,
|
||||||
/// The keys contained in the bibliography and short descriptions of them.
|
/// The keys contained in the bibliography and short descriptions of them.
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
pub bibliography_keys: fn(
|
pub bibliography_keys: fn(
|
||||||
world: Tracked<dyn World>,
|
world: Tracked<dyn World>,
|
||||||
introspector: Tracked<Introspector>,
|
introspector: Tracked<Introspector>,
|
||||||
|
@ -7,6 +7,7 @@ use super::{Content, Scope, Value};
|
|||||||
use crate::diag::StrResult;
|
use crate::diag::StrResult;
|
||||||
|
|
||||||
/// An evaluated module, ready for importing or typesetting.
|
/// An evaluated module, ready for importing or typesetting.
|
||||||
|
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||||
#[derive(Clone, Hash)]
|
#[derive(Clone, Hash)]
|
||||||
pub struct Module(Arc<Repr>);
|
pub struct Module(Arc<Repr>);
|
||||||
|
|
||||||
|
@ -241,6 +241,7 @@ impl Hash for Value {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A dynamic value.
|
/// A dynamic value.
|
||||||
|
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||||
#[derive(Clone, Hash)]
|
#[derive(Clone, Hash)]
|
||||||
pub struct Dynamic(Arc<dyn Bounds>);
|
pub struct Dynamic(Arc<dyn Bounds>);
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ use crate::syntax::Span;
|
|||||||
use crate::util::pretty_array_like;
|
use crate::util::pretty_array_like;
|
||||||
|
|
||||||
/// Composable representation of styled content.
|
/// Composable representation of styled content.
|
||||||
|
#[allow(clippy::derived_hash_with_manual_eq)]
|
||||||
#[derive(Clone, Hash)]
|
#[derive(Clone, Hash)]
|
||||||
pub struct Content {
|
pub struct Content {
|
||||||
func: ElemFunc,
|
func: ElemFunc,
|
||||||
|
@ -36,6 +36,7 @@ fn try_reparse(
|
|||||||
offset: usize,
|
offset: usize,
|
||||||
) -> Option<Range<usize>> {
|
) -> Option<Range<usize>> {
|
||||||
// The range of children which overlap with the edit.
|
// The range of children which overlap with the edit.
|
||||||
|
#[allow(clippy::reversed_empty_ranges)]
|
||||||
let mut overlap = usize::MAX..0;
|
let mut overlap = usize::MAX..0;
|
||||||
let mut cursor = offset;
|
let mut cursor = offset;
|
||||||
let node_kind = node.kind();
|
let node_kind = node.kind();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user